Uses of Interface
java.util.stream.Gatherer.Downstream
Package
Description
Classes to support functional-style operations on streams of elements, such
as map-reduce transformations on collections.
-
Uses of Gatherer.DownstreamPREVIEW in java.util.stream
Modifier and TypeMethodDescriptionstatic <A,
R> BiConsumer <A, Gatherer.DownstreamPREVIEW<? super R>> Gatherer.defaultFinisher()
Returns afinisher
which is the default finisher of aGatherer
.default BiConsumer
<A, Gatherer.DownstreamPREVIEW<? super R>> Gatherer.finisher()
A function which accepts the final intermediate state and aGatherer.Downstream
PREVIEW object, allowing to perform a final action at the end of input elements.Modifier and TypeMethodDescriptionboolean
Performs an action given: the current state, the next element, and a downstream object; potentially inspecting and/or updating the state, optionally sending any number of elements downstream -- and then returns whether more elements are to be consumed or not.Modifier and TypeMethodDescriptionGatherer.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, 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, 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, BiConsumer<Void, Gatherer.DownstreamPREVIEW<? super R>> finisher) Returns a new, sequential, and statelessGatherer
described by the givenintegrator
andfinisher
.