https://github.com/bakdata/seq2
This library is a extension to the great jOOλ library (https://github.com/jOOQ/jOOL)
https://github.com/bakdata/seq2
Last synced: 12 months ago
JSON representation
This library is a extension to the great jOOλ library (https://github.com/jOOQ/jOOL)
- Host: GitHub
- URL: https://github.com/bakdata/seq2
- Owner: bakdata
- License: apache-2.0
- Created: 2019-11-18T10:00:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-27T10:53:29.000Z (about 2 years ago)
- Last Synced: 2025-04-10T23:48:13.566Z (12 months ago)
- Language: Java
- Homepage:
- Size: 202 KB
- Stars: 2
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://dev.azure.com/bakdata/public/_build/latest?definitionId=21&branchName=master)
[](https://sonarcloud.io/dashboard?id=com.bakdata.seq2%3Aseq2)
[](https://sonarcloud.io/dashboard?id=com.bakdata.seq2%3Aseq2)
[](https://search.maven.org/search?q=g:com.bakdata.seq2%20AND%20a:seq2&core=gav)
# seq2
This library is an extension to the great [jOOλ library](https://github.com/jOOQ/jOOL).
It mainly provides native handling of pair streams.
## Usage
```java
final Seq2 words = Seq2.of("foo", "bar", "foo");
final Map wordCounts = words.mapToPair(Function.identity(), s -> 1)
.reduceByKey(Integer::sum)
.toMap();
System.out.println(wordCounts);
// {bar=1, foo=2}
```
## Getting Started
You can add seq2 via Maven Central.
#### Gradle
```gradle
compile group: 'com.bakdata.seq2', name: 'seq2', version: '1.0.0'
```
#### Maven
```xml
com.bakdata.seq2
seq2
1.0.0
```
For other build tools or versions, refer to the [latest version in MvnRepository](https://mvnrepository.com/artifact/com.bakdata.seq2/seq2/latest).
## Development
If you want to contribute to this project, you can simply clone the repository and build it via Gradle.
All dependencies should be included in the Gradle files, there are no external prerequisites.
```bash
> git clone git@github.com:bakdata/seq2.git
> cd seq2 && ./gradlew build
```
Please note, that we have [code styles](https://github.com/bakdata/bakdata-code-styles) for Java.
They are basically the Google style guide, with some small modifications.
## Contributing
We are happy if you want to contribute to this project.
If you find any bugs or have suggestions for improvements, please open an issue.
We are also happy to accept your PRs.
Just open an issue beforehand and let us know what you want to do and why.
## License
This project is licensed under the MIT license.
Have a look at the [LICENSE](https://github.com/bakdata/seq2/blob/master/LICENSE) for more details.