org.apache.commons.lang3.stream

## Class Streams.ArrayCollector<E>

- java.lang.Object
- - org.apache.commons.lang3.stream.Streams.ArrayCollector<E>

- Type Parameters:
    `E` - The array type.
  All Implemented Interfaces:
    Collector<E,List<E>,E[]>
  Enclosing class:
    Streams

      public static class Streams.ArrayCollector<E>
      extends Object
      implements Collector<E,List<E>,E[]>

  A Collector type for arrays.

- - ### Nested Class Summary

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

      `Collector.Characteristics`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ArrayCollector(Class<E> elementType)` Constructs a new instance for the given element type.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `BiConsumer<List<E>,E>` | `accumulator()`
    `Set<Collector.Characteristics>` | `characteristics()`
    `BinaryOperator<List<E>>` | `combiner()`
    `Function<List<E>,E[]>` | `finisher()`
    `Supplier<List<E>>` | `supplier()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.stream.Collector

      `of, of`

- - ### Constructor Detail

    - #### ArrayCollector

          public ArrayCollector(Class<E> elementType)

      Constructs a new instance for the given element type.
      Parameters:
        `elementType` - The element type.

  - ### Method Detail

    - #### accumulator

          public BiConsumer<List<E>,E> accumulator()

      Specified by:
        `accumulator` in interface `Collector<E,List<E>,E[]>`

    - #### characteristics

          public Set<Collector.Characteristics> characteristics()

      Specified by:
        `characteristics` in interface `Collector<E,List<E>,E[]>`

    - #### combiner

          public BinaryOperator<List<E>> combiner()

      Specified by:
        `combiner` in interface `Collector<E,List<E>,E[]>`

    - #### finisher

          public Function<List<E>,E[]> finisher()

      Specified by:
        `finisher` in interface `Collector<E,List<E>,E[]>`

    - #### supplier

          public Supplier<List<E>> supplier()

      Specified by:
        `supplier` in interface `Collector<E,List<E>,E[]>`

Copyright © 2001–2023 The Apache Software Foundation. All rights reserved.