Create primitiveStream methods for IntBag, LongBag and DoubleBag
donraab opened this issue · comments
Donald Raab commented
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.
Des Petrov commented
hi @donraab - happy to take a look at this
Donald Raab commented
Thanks for volunteering @Desislav-Petrov! I have assigned the issue to you.