# Uses of Interface
java.util.stream.Gatherer

Packages that use Gatherer
Package
Description
java.util.stream
Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.

- ## Uses of Gatherer in java.util.stream

  Methods in java.util.stream that return Gatherer
  Modifier and Type
  Method
  Description
  `default <RR> Gatherer<T,?,RR>`
  Gatherer.`andThen(Gatherer<? super R, ?, ? extends RR> that)`
  Returns a composed Gatherer which connects the output of this Gatherer to the input of that Gatherer.
  `static <T,R> Gatherer<T,?,R>`
  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.
  `static <T,R> Gatherer<T,?,R>`
  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.
  `static <T,A,R> Gatherer<T,A,R>`
  Gatherer.`of(Supplier<A> initializer, Gatherer.Integrator<A,T,R> integrator, BinaryOperator<A> combiner, BiConsumer<A, Gatherer.Downstream<? super R>> finisher)`
  Returns a new, parallelizable, `Gatherer` described by the given `initializer`, `integrator`, `combiner` and `finisher`.
  `static <T,R> Gatherer<T,Void,R>`
  Gatherer.`of(Gatherer.Integrator<Void,T,R> integrator)`
  Returns a new, parallelizable, and stateless `Gatherer` described by the given `integrator`.
  `static <T,R> Gatherer<T,Void,R>`
  Gatherer.`of(Gatherer.Integrator<Void,T,R> integrator, BiConsumer<Void, Gatherer.Downstream<? super R>> finisher)`
  Returns a new, parallelizable, and stateless `Gatherer` described by the given `integrator` and `finisher`.
  `static <T,A,R> Gatherer<T,A,R>`
  Gatherer.`ofSequential(Supplier<A> initializer, Gatherer.Integrator<A,T,R> integrator)`
  Returns a new, sequential, `Gatherer` described by the given `initializer` and `integrator`.
  `static <T,A,R> Gatherer<T,A,R>`
  Gatherer.`ofSequential(Supplier<A> initializer, Gatherer.Integrator<A,T,R> integrator, BiConsumer<A, Gatherer.Downstream<? super R>> finisher)`
  Returns a new, sequential, `Gatherer` described by the given `initializer`, `integrator`, and `finisher`.
  `static <T,R> Gatherer<T,Void,R>`
  Gatherer.`ofSequential(Gatherer.Integrator<Void,T,R> integrator)`
  Returns a new, sequential, and stateless `Gatherer` described by the given `integrator`.
  `static <T,R> Gatherer<T,Void,R>`
  Gatherer.`ofSequential(Gatherer.Integrator<Void,T,R> integrator, BiConsumer<Void, Gatherer.Downstream<? super R>> finisher)`
  Returns a new, sequential, and stateless `Gatherer` described by the given `integrator` and `finisher`.
  `static <T,R> Gatherer<T,?,R>`
  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.
  `static <TR> Gatherer<TR,?,List<TR>>`
  Gatherers.`windowFixed(int windowSize)`
  Returns a Gatherer that gathers elements into windows -- encounter-ordered groups of elements -- of a fixed size.
  `static <TR> Gatherer<TR,?,List<TR>>`
  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 Gatherer
  Modifier and Type
  Method
  Description
  `default <RR> Gatherer<T,?,RR>`
  Gatherer.`andThen(Gatherer<? super R, ?, ? extends RR> that)`
  Returns a composed Gatherer which connects the output of this Gatherer to the input of that Gatherer.
  `default <R> Stream<R>`
  Stream.`gather(Gatherer<? super T, ?, R> gatherer)`
  Returns a stream consisting of the results of applying the given `Gatherer` to the elements of this stream.