eclipse / eclipse-collections

Eclipse Collections is a collections framework for Java with optimized data structures and a rich, functional and fluent API.
https://eclipse.dev/collections/
2.42k stars 604 forks source link

Create primitiveStream methods for IntBag, LongBag and DoubleBag #1455

Open donraab opened 1 year ago

donraab commented 1 year ago

Since 10.0, we have had primitiveStream on IntList, LongList and DoubleList. This makes the following possible:

List<String> list = IntLists.immutable.of(1, 2, 3)
        .primitiveStream()
        .mapToObj(Integer::toString)
        .toList();

Assertions.assertEquals(List.of("1", "2", "3"), list);

There is no equivalent for IntBag, LongBag, and DoubleBag today. This will additionally require creating spliterator() for each of these.

Desislav-Petrov commented 1 year ago

hi @donraab - happy to take a look at this

donraab commented 1 year ago

Thanks for volunteering @Desislav-Petrov! I have assigned the issue to you.

Tushar1619 commented 2 months ago

Is this issue still open @donraab ?