Skip to content

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

@schlegel11

Description

@schlegel11

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));
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions