Package org.eclipse.net4j.util.collection

# Class GrowingRandomAccessList<E>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
org.eclipse.net4j.util.collection.GrowingRandomAccessList<E>

All Implemented Interfaces:
  `Iterable<E>`, `Collection<E>`, `List<E>`, `Queue<E>`, `RandomAccess`

public class GrowingRandomAccessList<E> extends AbstractList<E> implements Queue<E>, RandomAccess

Since:
  3.3
Author:
  Eike Stepper

## Field Summary

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

`modCount`

## Constructor Summary

Constructors
Constructor
Description
`GrowingRandomAccessList(Class<E> componentType, int pageCapacity)`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(int index, E element)`
`boolean`
`add(E e)`
`boolean`
`addAll(int index, Collection<? extends E> c)`
`void`
`addFirst(E e)`
`void`
`addLast(E e)`
`void`
`clear()`
`protected E[]`
`createPage()`
`Iterator<E>`
`descendingIterator()`
`E`
`element()`
`E`
`get(int index)`
`E`
`getFirst()`
`E`
`getLast()`
`protected E[]`
`getPage(int index)`
`protected int`
`getPageIndex(int index)`
`boolean`
`offer(E e)`
`boolean`
`offerFirst(E e)`
`boolean`
`offerLast(E e)`
`E`
`peek()`
`E`
`peekFirst()`
`E`
`peekLast()`
`E`
`poll()`
`E`
`pollFirst()`
`E`
`pollLast()`
`E`
`pop()`
`void`
`push(E e)`
`E`
`remove()`
`E`
`remove(int index)`
`boolean`
`remove(Object o)`
`boolean`
`removeAll(Collection<?> c)`
`E`
`removeFirst()`
`boolean`
`removeFirstOccurrence(Object o)`
`E`
`removeLast()`
`boolean`
`removeLastOccurrence(Object o)`
`boolean`
`retainAll(Collection<?> c)`
`E`
`set(int index, E element)`
`int`
`size()`

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

`equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList`

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

`addAll, contains, containsAll, isEmpty, 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 java.lang.Iterable

`forEach`

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

`addAll, contains, containsAll, isEmpty, replaceAll, sort, spliterator, toArray, toArray`

## Constructor Details

### GrowingRandomAccessList

public GrowingRandomAccessList(Class<E> componentType, int pageCapacity)

## Method Details

### get

public E get(int index)

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

### size

public int size()

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

### addFirst

public void addFirst(E e)

### addLast

public void addLast(E e)

### add

public boolean add(E e)

Specified by:
  `add` in interface `Collection<E>`
Specified by:
  `add` in interface `List<E>`
Specified by:
  `add` in interface `Queue<E>`
Overrides:
  `add` in class `AbstractList<E>`

### set

public E set(int index, E element)

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

### add

public void add(int index, E element)

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

### remove

public E remove(int index)

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

### clear

public void clear()

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

### addAll

public boolean addAll(int index, Collection<? extends E> c)

Specified by:
  `addAll` in interface `List<E>`
Overrides:
  `addAll` in class `AbstractList<E>`

### remove

public boolean remove(Object o)

Specified by:
  `remove` in interface `Collection<E>`
Specified by:
  `remove` in interface `List<E>`
Overrides:
  `remove` in class `AbstractCollection<E>`

### removeAll

public boolean removeAll(Collection<?> c)

Specified by:
  `removeAll` in interface `Collection<E>`
Specified by:
  `removeAll` in interface `List<E>`
Overrides:
  `removeAll` in class `AbstractCollection<E>`

### retainAll

public boolean retainAll(Collection<?> c)

Specified by:
  `retainAll` in interface `Collection<E>`
Specified by:
  `retainAll` in interface `List<E>`
Overrides:
  `retainAll` in class `AbstractCollection<E>`

### offerFirst

public boolean offerFirst(E e)

### offerLast

public boolean offerLast(E e)

### removeFirst

public E removeFirst()

### removeLast

public E removeLast()

### pollFirst

public E pollFirst()

### pollLast

public E pollLast()

### getFirst

public E getFirst()

### getLast

public E getLast()

### peekFirst

public E peekFirst()

### peekLast

public E peekLast()

### removeFirstOccurrence

public boolean removeFirstOccurrence(Object o)

### removeLastOccurrence

public boolean removeLastOccurrence(Object o)

### offer

public boolean offer(E e)

Specified by:
  `offer` in interface `Queue<E>`

### remove

public E remove()

Specified by:
  `remove` in interface `Queue<E>`

### poll

public E poll()

Specified by:
  `poll` in interface `Queue<E>`

### element

public E element()

Specified by:
  `element` in interface `Queue<E>`

### peek

public E peek()

Specified by:
  `peek` in interface `Queue<E>`

### push

public void push(E e)

### pop

public E pop()

### descendingIterator

public Iterator<E> descendingIterator()

### createPage

protected E[] createPage()

### getPage

protected E[] getPage(int index)

### getPageIndex

protected int getPageIndex(int index)