eclipse-collections icon indicating copy to clipboard operation
eclipse-collections copied to clipboard

Implement stream and parallelStream on RichIterable

Open donraab opened this issue 6 years ago • 2 comments

Today we have stream() and parallelStream() on MutableCollection (inherited from java.util.Collection) and ImmutableCollection. We should move these methods up to RichIterable.

donraab avatar Jun 01 '18 18:06 donraab

hi @donraab , do you have an idea how to do this? do you want that RichIterable will extend Collection? I am using the eclipse collections to get the memory benefits of primitives but now i am stuck with Lazyiterables instead of streams and i have many functions which already work with streams. It would great to have a more standatd interface to the external world.

Thanks,

david-gang avatar Dec 02 '18 08:12 david-gang

RichIterable and LazyIterable must not extend Collection.

Implementing stream() across the board isn't easy. FastList would need a stream similar to ArrayList's. Same for UnifiedSet and HashSet. For other collection types, we're on our own.

On Sun, Dec 2, 2018 at 3:34 AM David Gang [email protected] wrote:

hi @donraab https://github.com/donraab , do you have an idea how to do this? do you want that RichIterable will extend Collection? I am using the eclipse collections to get the memory benefits of primitives but now i am stuck with Lazyiterables instead of streams and i have many functions which already work with streams. It would great to have a more standatd interface to the external world.

Thanks,

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eclipse/eclipse-collections/issues/525#issuecomment-443490881, or mute the thread https://github.com/notifications/unsubscribe-auth/AAO6IrQvh55AqqLvTqL9nNRWCMiU1F_1ks5u05CZgaJpZM4UXIPU .

motlin avatar Dec 02 '18 15:12 motlin