Skip to main content

Posts

Showing posts with the label Sequential Stream

Java 8 - Streams - Sequential Stream

Operations on sequential streams are performed on a single thread.
sequential Integer stream IntStream sequentialIntegerStream = IntStream.range(0, 10);


USAGE

Consumer<IntStream> sequentialStreamConsumer = stream -> stream.forEach(item -> log.info(""+item));

sequentialStreamConsumer.accept(sequentialIntegerStream);