Interface RemoteCollector<T,A,R>

Type Parameters:
T - the type of input elements to the reduction operation
A - the mutable accumulation type of the reduction operation (often hidden as an implementation detail)
R - the result type of the reduction operation
All Superinterfaces:
Collector<T,A,R>, Serializable

public interface RemoteCollector<T,A,R> extends Collector<T,A,R>, Serializable
An extension of Collector that adds serialization support.
Since:
12.2.1
Author:
as 2014.10.01
See Also:
  • Method Details

    • of

      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. The resulting Collector has the Collector.Characteristics.IDENTITY_FINISH characteristic.
      Type Parameters:
      T - The type of input elements for the new collector
      R - The type of intermediate accumulation result, and final result, for the new collector
      Parameters:
      supplier - The supplier function for the new collector
      accumulator - The accumulator function for the new collector
      combiner - The combiner function for the new collector
      characteristics - The collector characteristics for the new collector
      Returns:
      the new Collector
      Throws:
      NullPointerException - if any argument is null
    • of

      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. The resulting Collector has the Collector.Characteristics.IDENTITY_FINISH characteristic.
      Type Parameters:
      T - The type of input elements for the new collector
      R - The type of intermediate accumulation result, and final result, for the new collector
      Parameters:
      supplier - The supplier function for the new collector
      accumulator - The accumulator function for the new collector
      combiner - The combiner function for the new collector
      characteristics - The collector characteristics for the new collector
      Returns:
      the new Collector
      Throws:
      NullPointerException - if any argument is null
    • of

      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.
      Type Parameters:
      T - The type of input elements for the new collector
      A - The intermediate accumulation type of the new collector
      R - The final result type of the new collector
      Parameters:
      supplier - The supplier function for the new collector
      accumulator - The accumulator function for the new collector
      combiner - The combiner function for the new collector
      finisher - The finisher function for the new collector
      characteristics - The collector characteristics for the new collector
      Returns:
      the new Collector
      Throws:
      NullPointerException - if any argument is null
    • of

      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.
      Type Parameters:
      T - The type of input elements for the new collector
      A - The intermediate accumulation type of the new collector
      R - The final result type of the new collector
      Parameters:
      supplier - The supplier function for the new collector
      accumulator - The accumulator function for the new collector
      combiner - The combiner function for the new collector
      finisher - The finisher function for the new collector
      characteristics - The collector characteristics for the new collector
      Returns:
      the new Collector
      Throws:
      NullPointerException - if any argument is null