Package org.apache.avro.generic

# Class PrimitivesArrays.IntArray

java.lang.Object
java.util.AbstractCollection<Integer>
java.util.AbstractList<Integer>
org.apache.avro.generic.GenericData.AbstractArray<Integer>
org.apache.avro.generic.PrimitivesArrays.PrimitiveArray<Integer>
org.apache.avro.generic.PrimitivesArrays.IntArray

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

Enclosing class:
  `PrimitivesArrays`

public static class PrimitivesArrays.IntArray extends PrimitivesArrays.PrimitiveArray<Integer>

## Field Summary

### Fields inherited from class org.apache.avro.generic.GenericData.AbstractArray

`size`

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

`modCount`

## Constructor Summary

Constructors
Constructor
Description
`IntArray(int capacity, Schema schema)`
`IntArray(Schema schema, Collection<Integer> c)`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(int location, int o)`
`void`
`add(int location, Integer o)`
`void`
`clear()`
`Integer`
`get(int i)`
`int`
`getInt(int i)`
Direct primitive int access.
`Integer`
`peek()`
The current content of the location where `List.add(Object)` would next store an element, if any.
`Integer`
`remove(int i)`
`int`
`set(int i, int o)`
`Integer`
`set(int i, Integer o)`
`protected void`
`swap(int index1, int index2)`
`Schema.Type`
`valueType()`

### Methods inherited from class org.apache.avro.generic.GenericData.AbstractArray

`compareTo, equals, getSchema, hashCode, iterator, reset, reverse, size`

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

`add, addAll, indexOf, lastIndexOf, listIterator, listIterator, removeRange, 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

`prune`

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

`forEach`

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

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

## Constructor Details

### IntArray

public IntArray(int capacity, Schema schema)

### IntArray

public IntArray(Schema schema, Collection<Integer> c)

## Method Details

### clear

public void clear()

Specified by:
  `clear` in interface `Collection<Integer>`
Specified by:
  `clear` in interface `List<Integer>`
Overrides:
  `clear` in class `AbstractList<Integer>`

### get

public Integer get(int i)

Specified by:
  `get` in interface `List<Integer>`
Specified by:
  `get` in class `AbstractList<Integer>`

### getInt

public int getInt(int i)
Direct primitive int access.

Parameters:
  `i` - : index.
Returns:
  value at index.

### add

public void add(int location, Integer o)

Specified by:
  `add` in interface `List<Integer>`
Overrides:
  `add` in class `AbstractList<Integer>`

### add

public void add(int location, int o)

### set

public Integer set(int i, Integer o)

Specified by:
  `set` in interface `List<Integer>`
Overrides:
  `set` in class `AbstractList<Integer>`

### set

public int set(int i, int o)

### remove

public Integer remove(int i)

Specified by:
  `remove` in interface `List<Integer>`
Overrides:
  `remove` in class `AbstractList<Integer>`

### peek

public Integer peek()
Description copied from interface: `GenericArray`
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.

### swap

protected void swap(int index1, int index2)

Specified by:
  `swap` in class `GenericData.AbstractArray<Integer>`

### valueType

public Schema.Type valueType()

Specified by:
  `valueType` in class `PrimitivesArrays.PrimitiveArray<Integer>`