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
  • 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)