Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement] Some "min" and "max" methods for event stream. #65

Open
schlegel11 opened this issue Aug 23, 2017 · 0 comments
Open

[enhancement] Some "min" and "max" methods for event stream. #65

schlegel11 opened this issue Aug 23, 2017 · 0 comments

Comments

@schlegel11
Copy link

Hi,
in a current project I use a lot "min" and "max" methods (like the methods from the java stream api).
So in this project I wrote a small event stream extension with this methods but maybe there is the possibility to add these methods in a upcoming release/milestone/snapshot ;)

default EventStream<T> min(Comparator<? super T> comparator) {
        return accumulate(BinaryOperator.minBy(comparator));
    }

 default EventStream<T> max(Comparator<? super T> comparator) {
        return accumulate(BinaryOperator.maxBy(comparator));
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant