davidmoten / rxjava-extras

Utilities for use with rxjava
Apache License 2.0
269 stars 27 forks source link

toListWhile for Stream API #22

Open maslick opened 7 years ago

maslick commented 7 years ago

Do you know how to implement the same functionality of toListWhile using java 8 stream api (no rx)? Thank you.

thomasnield commented 7 years ago

This sounds like a question best suited for stack overflow

akarnokd commented 7 years ago

I've looked into the Stream API before and I found it quite convoluted due to the Spliterator. Implementing custom Iterable/Iterator is quite straightforward in contrast: have a look at IxJava which has 3 modes for buffering with condition.

davidmoten commented 7 years ago

Thanks guys

On Wed, 5 Apr 2017, 20:44 David Karnok notifications@github.com wrote:

I've looked into the Stream API before and I found it quite convoluted due to the Spliterator. Implementing custom Iterable/Iterator is quite straightforward in contrast: have a look at IxJava https://github.com/akarnokd/ixjava which has 3 modes https://github.com/akarnokd/ixjava/blob/1.x/src/main/java/ix/Ix.java#L842 for buffering with condition.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/davidmoten/rxjava-extras/issues/22#issuecomment-291823515, or mute the thread https://github.com/notifications/unsubscribe-auth/AATa64ljeHfcQ5HbglS1JtT4vzAW2ebAks5rs3B7gaJpZM4M0A5- .