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 voidadd(int index, E element)booleanadd(E e)booleanaddAll(int index, java.util.Collection<? extends E> c)voidaddFirst(E e)voidaddLast(E e)voidclear()protected E[]createPage()java.util.Iterator<E>descendingIterator()Eelement()Eget(int index)EgetFirst()EgetLast()protected E[]getPage(int index)protected intgetPageIndex(int index)booleanoffer(E e)booleanofferFirst(E e)booleanofferLast(E e)Epeek()EpeekFirst()EpeekLast()Epoll()EpollFirst()EpollLast()Epop()voidpush(E e)Eremove()Eremove(int index)booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)EremoveFirst()booleanremoveFirstOccurrence(java.lang.Object o)EremoveLast()booleanremoveLastOccurrence(java.lang.Object o)booleanretainAll(java.util.Collection<?> c)Eset(int index, E element)intsize()-
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)
-
-