Class Streams.ArrayCollector<O>

  • Type Parameters:
    O - The array type.
    All Implemented Interfaces:
    java.util.stream.Collector<O,​java.util.List<O>,​O[]>
    Enclosing class:
    Streams

    public static class Streams.ArrayCollector<O>
    extends java.lang.Object
    implements java.util.stream.Collector<O,​java.util.List<O>,​O[]>
    A Collector type for arrays.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.stream.Collector

        java.util.stream.Collector.Characteristics
    • Constructor Summary

      Constructors 
      Constructor Description
      ArrayCollector​(java.lang.Class<O> elementType)
      Constructs a new instance for the given element type.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.function.BiConsumer<java.util.List<O>,​O> accumulator()  
      java.util.Set<java.util.stream.Collector.Characteristics> characteristics()  
      java.util.function.BinaryOperator<java.util.List<O>> combiner()  
      java.util.function.Function<java.util.List<O>,​O[]> finisher()  
      java.util.function.Supplier<java.util.List<O>> supplier()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ArrayCollector

        public ArrayCollector​(java.lang.Class<O> elementType)
        Constructs a new instance for the given element type.
        Parameters:
        elementType - The element type.
    • Method Detail

      • accumulator

        public java.util.function.BiConsumer<java.util.List<O>,​O> accumulator()
        Specified by:
        accumulator in interface java.util.stream.Collector<O,​java.util.List<O>,​O[]>
      • characteristics

        public java.util.Set<java.util.stream.Collector.Characteristics> characteristics()
        Specified by:
        characteristics in interface java.util.stream.Collector<O,​java.util.List<O>,​O[]>
      • combiner

        public java.util.function.BinaryOperator<java.util.List<O>> combiner()
        Specified by:
        combiner in interface java.util.stream.Collector<O,​java.util.List<O>,​O[]>
      • finisher

        public java.util.function.Function<java.util.List<O>,​O[]> finisher()
        Specified by:
        finisher in interface java.util.stream.Collector<O,​java.util.List<O>,​O[]>
      • supplier

        public java.util.function.Supplier<java.util.List<O>> supplier()
        Specified by:
        supplier in interface java.util.stream.Collector<O,​java.util.List<O>,​O[]>