Package java.util.stream
package java.util.stream
-
ClassDescriptionWhat the object stream and the three primitive ones have in common.Collector<T,
A, R> HowStream.collect(Collector)folds the elements of a stream into a result: a container to start from, a step per element, a way to merge two containers and a last step that turns the container into the result.What a collector says about itself.The commonCollectors: into collections, maps, strings, groups and numbers.A sequence ofdoublevalues to which operations are applied one stage at a time, evaluated lazily, one element at a time, when a terminal operation asks for them.A sequence ofintvalues to which operations are applied one stage at a time, evaluated lazily, one element at a time, when a terminal operation asks for them.A sequence oflongvalues to which operations are applied one stage at a time, evaluated lazily, one element at a time, when a terminal operation asks for them.Stream<T>A stream here is sequential and lazy: each stage pulls one element at a time from the one before it, and only when a terminal operation asks.java.util.stream.Stream.Builder: collects elements, then answers them as a stream, once.Makes aStreamof aSpliterator: whatCollection.stream()does, and how a library turns anyIterableinto a stream (StreamSupport.stream(iterable.spliterator(), false)).