Package org.apache.avro.generic

# Class GenericData.AbstractArray<T>

java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractList<T>
org.apache.avro.generic.GenericData.AbstractArray<T>

All Implemented Interfaces:
  `Comparable<GenericArray<T>>`, `Iterable<T>`, `Collection<T>`, `List<T>`, `GenericArray<T>`, `GenericContainer`

Direct Known Subclasses:
  `GenericData.Array`, `PrimitivesArrays.PrimitiveArray`

Enclosing class:
  `GenericData`

public abstract static class GenericData.AbstractArray<T> extends AbstractList<T> implements GenericArray<T>, Comparable<GenericArray<T>>

## Field Summary

Fields
Modifier and Type
Field
Description
`protected int`
`size`

### Fields inherited from class java.util.AbstractList

`modCount`

## Constructor Summary

Constructors
Constructor
Description
`AbstractArray(Schema schema)`

## Method Summary

Modifier and Type
Method
Description
`int`
`compareTo(GenericArray<T> that)`
`boolean`
`equals(Object o)`
`Schema`
`getSchema()`
The schema of this instance.
`int`
`hashCode()`
`Iterator<T>`
`iterator()`
`void`
`reset()`
reset size counter of array to zero
`void`
`reverse()`
Reverses the order of the elements in this array.
`int`
`size()`
`protected abstract void`
`swap(int index1, int index2)`

### Methods inherited from class java.util.AbstractList

`add, add, addAll, clear, get, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList`

### Methods inherited from class java.util.AbstractCollection

`addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

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

`parallelStream, removeIf, stream, toArray`

### Methods inherited from interface org.apache.avro.generic.GenericArray

`peek, prune`

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

`forEach`

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

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

## Field Details

### size

protected int size

## Constructor Details

### AbstractArray

public AbstractArray(Schema schema)

## Method Details

### getSchema

public Schema getSchema()
Description copied from interface: `GenericContainer`
The schema of this instance.

Specified by:
  `getSchema` in interface `GenericContainer`

### size

public int size()

Specified by:
  `size` in interface `Collection<T>`
Specified by:
  `size` in interface `List<T>`
Specified by:
  `size` in class `AbstractCollection<T>`

### reset

public void reset()
Description copied from interface: `GenericArray`
reset size counter of array to zero

Specified by:
  `reset` in interface `GenericArray<T>`

### compareTo

public int compareTo(GenericArray<T> that)

Specified by:
  `compareTo` in interface `Comparable<T>`

### equals

public boolean equals(Object o)

Specified by:
  `equals` in interface `Collection<T>`
Specified by:
  `equals` in interface `List<T>`
Overrides:
  `equals` in class `AbstractList<T>`

### hashCode

public int hashCode()

Specified by:
  `hashCode` in interface `Collection<T>`
Specified by:
  `hashCode` in interface `List<T>`
Overrides:
  `hashCode` in class `AbstractList<T>`

### iterator

public Iterator<T> iterator()

Specified by:
  `iterator` in interface `Collection<T>`
Specified by:
  `iterator` in interface `Iterable<T>`
Specified by:
  `iterator` in interface `List<T>`
Overrides:
  `iterator` in class `AbstractList<T>`

### reverse

public void reverse()
Description copied from interface: `GenericArray`
Reverses the order of the elements in this array.

Specified by:
  `reverse` in interface `GenericArray<T>`

### swap

protected abstract void swap(int index1, int index2)