I\'m trying to use an IntStream to instantiate a stream of objects:
IntStream
Stream myObjects = IntStream .range(0, count
Stream stream2 = intStream.mapToObj( i -> new ClassName(i));
This will convert the intstream to Stream of specified object type, mapToObj accepts a function.
intstream
Stream
mapToObj
There is method intStream.boxed() to convert intStream directly to Stream
intStream.boxed()