T - the type of input elements to the reduction operationA - the mutable accumulation type of the reduction operation (often hidden as an implementation detail)R - the result type of the reduction operationpublic interface RemoteCollector<T,A,R> extends Collector<T,A,R>, Serializable
Collector that adds serialization support.RemoteStream.collect(RemoteCollector), RemoteCollectorsCollector.Characteristics| Modifier and Type | Method and Description |
|---|---|
static <T,A,R> RemoteCollector<T,A,R> |
of(Remote.Supplier<A> supplier, Remote.BiConsumer<A,T> accumulator, Remote.BinaryOperator<A> combiner, Remote.Function<A,R> finisher, Collector.Characteristics... characteristics)
Returns a new
Collector described by the given supplier, accumulator, combiner, and finisher functions. |
static <T,R> RemoteCollector<T,R,R> |
of(Remote.Supplier<R> supplier, Remote.BiConsumer<R,T> accumulator, Remote.BinaryOperator<R> combiner, Collector.Characteristics... characteristics)
Returns a new
Collector described by the given supplier, accumulator, and combiner functions. |
static <T,A,R> RemoteCollector<T,A,R> |
of(Supplier<A> supplier, BiConsumer<A,T> accumulator, BinaryOperator<A> combiner, Function<A,R> finisher, Collector.Characteristics... characteristics)
Returns a new
Collector described by the given supplier, accumulator, combiner, and finisher functions. |
static <T,R> RemoteCollector<T,R,R> |
of(Supplier<R> supplier, BiConsumer<R,T> accumulator, BinaryOperator<R> combiner, Collector.Characteristics... characteristics)
Returns a new
Collector described by the given supplier, accumulator, and combiner functions. |
accumulator, characteristics, combiner, finisher, supplierstatic <T,R> RemoteCollector<T,R,R> of(Supplier<R> supplier, BiConsumer<R,T> accumulator, BinaryOperator<R> combiner, Collector.Characteristics... characteristics)
Collector described by the given supplier, accumulator, and combiner functions. The resulting Collector has the Collector.Characteristics.IDENTITY_FINISH characteristic.of in interface Collector<T,A,R>T - The type of input elements for the new collectorR - The type of intermediate accumulation result, and final result, for the new collectorsupplier - The supplier function for the new collectoraccumulator - The accumulator function for the new collectorcombiner - The combiner function for the new collectorcharacteristics - The collector characteristics for the new collectorCollectorNullPointerException - if any argument is nullstatic <T,R> RemoteCollector<T,R,R> of(Remote.Supplier<R> supplier, Remote.BiConsumer<R,T> accumulator, Remote.BinaryOperator<R> combiner, Collector.Characteristics... characteristics)
Collector described by the given supplier, accumulator, and combiner functions. The resulting Collector has the Collector.Characteristics.IDENTITY_FINISH characteristic.T - The type of input elements for the new collectorR - The type of intermediate accumulation result, and final result, for the new collectorsupplier - The supplier function for the new collectoraccumulator - The accumulator function for the new collectorcombiner - The combiner function for the new collectorcharacteristics - The collector characteristics for the new collectorCollectorNullPointerException - if any argument is nullstatic <T,A,R> RemoteCollector<T,A,R> of(Supplier<A> supplier, BiConsumer<A,T> accumulator, BinaryOperator<A> combiner, Function<A,R> finisher, Collector.Characteristics... characteristics)
Collector described by the given supplier, accumulator, combiner, and finisher functions.of in interface Collector<T,A,R>T - The type of input elements for the new collectorA - The intermediate accumulation type of the new collectorR - The final result type of the new collectorsupplier - The supplier function for the new collectoraccumulator - The accumulator function for the new collectorcombiner - The combiner function for the new collectorfinisher - The finisher function for the new collectorcharacteristics - The collector characteristics for the new collectorCollectorNullPointerException - if any argument is nullstatic <T,A,R> RemoteCollector<T,A,R> of(Remote.Supplier<A> supplier, Remote.BiConsumer<A,T> accumulator, Remote.BinaryOperator<A> combiner, Remote.Function<A,R> finisher, Collector.Characteristics... characteristics)
Collector described by the given supplier, accumulator, combiner, and finisher functions.T - The type of input elements for the new collectorA - The intermediate accumulation type of the new collectorR - The final result type of the new collectorsupplier - The supplier function for the new collectoraccumulator - The accumulator function for the new collectorcombiner - The combiner function for the new collectorfinisher - The finisher function for the new collectorcharacteristics - The collector characteristics for the new collectorCollectorNullPointerException - if any argument is null