Skip to content

bakdata/seq2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3e31079 · Feb 27, 2024

History

57 Commits
Feb 27, 2024
Feb 22, 2024
Feb 27, 2024
Jan 30, 2024
Feb 27, 2024
Nov 18, 2019
Nov 18, 2019
Feb 27, 2024
Feb 27, 2024
Feb 22, 2024
Feb 22, 2024
Oct 7, 2021
Oct 7, 2021

Repository files navigation

Build Status Quality Gate Status Coverage Maven

seq2

This library is an extension to the great jOOλ library. It mainly provides native handling of pair streams.

Usage

final Seq2<String> words = Seq2.of("foo", "bar", "foo");
final Map<String, Integer> 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

compile group: 'com.bakdata.seq2', name: 'seq2', version: '1.0.0'

Maven

<dependency>
    <groupId>com.bakdata.seq2</groupId>
    <artifactId>seq2</artifactId>
    <version>1.0.0</version>
</dependency>

For other build tools or versions, refer to the latest version in MvnRepository.

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.

> git clone git@github.com:bakdata/seq2.git
> cd seq2 && ./gradlew build

Please note, that we have 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 for more details.