Class GrowingRandomAccessList<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- org.eclipse.net4j.util.collection.GrowingRandomAccessList<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.List<E>
,java.util.Queue<E>
,java.util.RandomAccess
public class GrowingRandomAccessList<E> extends java.util.AbstractList<E> implements java.util.Queue<E>, java.util.RandomAccess
- Since:
- 3.3
- Author:
- Eike Stepper
-
-
Constructor Summary
Constructors Constructor Description GrowingRandomAccessList(java.lang.Class<E> componentType, int pageCapacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, E element)
boolean
add(E e)
boolean
addAll(int index, java.util.Collection<? extends E> c)
void
addFirst(E e)
void
addLast(E e)
void
clear()
protected E[]
createPage()
java.util.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(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
E
removeFirst()
boolean
removeFirstOccurrence(java.lang.Object o)
E
removeLast()
boolean
removeLastOccurrence(java.lang.Object o)
boolean
retainAll(java.util.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
-
-
-
-
Constructor Detail
-
GrowingRandomAccessList
public GrowingRandomAccessList(java.lang.Class<E> componentType, int pageCapacity)
-
-
Method Detail
-
get
public E get(int index)
-
size
public int size()
-
addFirst
public void addFirst(E e)
-
addLast
public void addLast(E e)
-
add
public boolean add(E e)
-
add
public void add(int index, E element)
-
remove
public E remove(int index)
-
clear
public void clear()
-
addAll
public boolean addAll(int index, java.util.Collection<? extends E> c)
-
remove
public boolean remove(java.lang.Object o)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
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(java.lang.Object o)
-
removeLastOccurrence
public boolean removeLastOccurrence(java.lang.Object o)
-
push
public void push(E e)
-
pop
public E pop()
-
descendingIterator
public java.util.Iterator<E> descendingIterator()
-
createPage
protected E[] createPage()
-
getPage
protected E[] getPage(int index)
-
getPageIndex
protected int getPageIndex(int index)
-
-