Uses of Interface
java.util.stream.Gatherer
Package
Description
Classes to support functional-style operations on streams of elements, such
as map-reduce transformations on collections.
-
Uses of GathererPREVIEW in java.util.stream
Methods in java.util.stream that return GathererPREVIEWModifier and TypeMethodDescriptionReturns a composed Gatherer which connects the output of this Gatherer to the input of that Gatherer.Gatherers.fold
(Supplier<R> initial, BiFunction<? super R, ? super T, ? extends R> folder) Returns a Gatherer that performs an ordered, reduction-like, transformation for scenarios where no combiner-function can be implemented, or for reductions which are intrinsically order-dependent.Gatherers.mapConcurrent
(int maxConcurrency, Function<? super T, ? extends R> mapper) An operation which executes a function concurrently with a configured level of max concurrency, using virtual threads.Gatherer.of
(Supplier<A> initializer, Gatherer.IntegratorPREVIEW<A, T, R> integrator, BinaryOperator<A> combiner, BiConsumer<A, Gatherer.DownstreamPREVIEW<? super R>> finisher) Returns a new, parallelizable,Gatherer
described by the giveninitializer
,integrator
,combiner
andfinisher
.Gatherer.of
(Gatherer.IntegratorPREVIEW<Void, T, R> integrator) Returns a new, parallelizable, and statelessGatherer
described by the givenintegrator
.Gatherer.of
(Gatherer.IntegratorPREVIEW<Void, T, R> integrator, BiConsumer<Void, Gatherer.DownstreamPREVIEW<? super R>> finisher) Returns a new, parallelizable, and statelessGatherer
described by the givenintegrator
andfinisher
.Gatherer.ofSequential
(Supplier<A> initializer, Gatherer.IntegratorPREVIEW<A, T, R> integrator) Returns a new, sequential,Gatherer
described by the giveninitializer
andintegrator
.Gatherer.ofSequential
(Supplier<A> initializer, Gatherer.IntegratorPREVIEW<A, T, R> integrator, BiConsumer<A, Gatherer.DownstreamPREVIEW<? super R>> finisher) Returns a new, sequential,Gatherer
described by the giveninitializer
,integrator
, andfinisher
.Gatherer.ofSequential
(Gatherer.IntegratorPREVIEW<Void, T, R> integrator) Returns a new, sequential, and statelessGatherer
described by the givenintegrator
.Gatherer.ofSequential
(Gatherer.IntegratorPREVIEW<Void, T, R> integrator, BiConsumer<Void, Gatherer.DownstreamPREVIEW<? super R>> finisher) Returns a new, sequential, and statelessGatherer
described by the givenintegrator
andfinisher
.Gatherers.scan
(Supplier<R> initial, BiFunction<? super R, ? super T, ? extends R> scanner) Returns a Gatherer that performs a Prefix Scan -- an incremental accumulation -- using the provided functions.Gatherers.windowFixed
(int windowSize) Returns a Gatherer that gathers elements into windows -- encounter-ordered groups of elements -- of a fixed size.Gatherers.windowSliding
(int windowSize) Returns a Gatherer that gathers elements into windows -- encounter-ordered groups of elements -- of a given size, where each subsequent window includes all elements of the previous window except for the least recent, and adds the next element in the stream.Methods in java.util.stream with parameters of type GathererPREVIEWModifier and TypeMethodDescriptionReturns a composed Gatherer which connects the output of this Gatherer to the input of that Gatherer.default <R> Stream
<R>