org.apache.avro.generic

## Interface GenericArray<T>

- All Superinterfaces:
    Collection<T>, GenericContainer, Iterable<T>, List<T>
  All Known Implementing Classes:
    GenericData.Array

      public interface GenericArray<T>
      extends List<T>, GenericContainer

  Array that permits reuse of contained elements.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `peek()` The current content of the location where `List.add(Object)` would next store an element, if any.
    `default void` | `prune()` clean up reusable objects from array (if reset didn't already)
    `default void` | `reset()` reset size counter of array to zero
    `void` | `reverse()` Reverses the order of the elements in this array.

    - ### Methods inherited from interface java.util.List

      `add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray`

    - ### Methods inherited from interface java.util.Collection

      `parallelStream, removeIf, stream`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

    - ### Methods inherited from interface org.apache.avro.generic.GenericContainer

      `getSchema`

- - ### Method Detail

    - #### peek

          T peek()

      The current content of the location where `List.add(Object)` would next store an element, if any. This permits reuse of arrays and their elements without allocating new objects.

    - #### reset

          default void reset()

      reset size counter of array to zero

    - #### prune

          default void prune()

      clean up reusable objects from array (if reset didn't already)

    - #### reverse

          void reverse()

      Reverses the order of the elements in this array.

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.