List<E> that also implements Deque<E> and Queue<E>
and methods for usage as stack.
When used as Queue<E>, elements are added to the end of
the List (tail), and retrieved from the start of the List (head).
When used as a stack, elements are added to and retrieved from the start of
the List (head) using push() and pop() methods.
Data is stored in an Object[] that doubles in size when the List gets full but does not shrink when it gets empty.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private int | |
| private int | |
| private Object[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | |
| public void | |
| public void | |
| public void | |
| public boolean | contains(Object value)
Overrides org. Implements org.
|
| public Iterator | |
| public E | |
| public E | |
| public E | |
| private int | |
| public E | |
| public int | |
| public int | |
| public boolean | |
| public boolean | |
| public boolean | |
| public E | |
| public E | |
| public E | |
| public E | |
| public E | |
| public E | |
| public E | |
| public void | |
| public E | |
| public boolean | |
| public E | remove(int index)
Implements abstract org. Implements org.
|
| public E | |
| public boolean | |
| public E | |
| public boolean | |
| private void | |
| public E | |
| public int | |
| public <T> T[] | |
| public Object[] |
| DEFAULT_INITIAL_CAPACITY | back to summary |
|---|---|
| private static final int DEFAULT_INITIAL_CAPACITY | |
| endindex | back to summary |
|---|---|
| private int endindex | |
| firstindex | back to summary |
|---|---|
| private int firstindex | |
| list | back to summary |
|---|---|
| private Object[] list | |
| HsqlDeque | back to summary |
|---|---|
| public HsqlDeque() | |
| add | back to summary |
|---|---|
| public void add(int i, E o) throws IndexOutOfBoundsException Implements org. | |
| add | back to summary |
|---|---|
| public boolean add(E o) Implements abstract org. Implements org. | |
| addFirst | back to summary |
|---|---|
| public void addFirst(E o) | |
| addLast | back to summary |
|---|---|
| public void addLast(E o) | |
| clear | back to summary |
|---|---|
| public void clear() Implements org. | |
| contains | back to summary |
|---|---|
| public boolean contains(Object value) Overrides org. Implements org. | |
| descendingIterator | back to summary |
|---|---|
| public Iterator | |
| element | back to summary |
|---|---|
| public E element() | |
| get | back to summary |
|---|---|
| public E get(int i) throws IndexOutOfBoundsException Implements abstract org. Implements org. | |
| getFirst | back to summary |
|---|---|
| public E getFirst() throws NoSuchElementException | |
| getInternalIndex | back to summary |
|---|---|
| private int getInternalIndex(int i) throws IndexOutOfBoundsException | |
| getLast | back to summary |
|---|---|
| public E getLast() throws NoSuchElementException | |
| indexOf | back to summary |
|---|---|
| public int indexOf(E value) Overrides org. | |
| lastIndexOf | back to summary |
|---|---|
| public int lastIndexOf(E value) | |
| offer | back to summary |
|---|---|
| public boolean offer(E e) | |
| offerFirst | back to summary |
|---|---|
| public boolean offerFirst(E e) | |
| offerLast | back to summary |
|---|---|
| public boolean offerLast(E e) | |
| peek | back to summary |
|---|---|
| public E peek() | |
| peekFirst | back to summary |
|---|---|
| public E peekFirst() | |
| peekLast | back to summary |
|---|---|
| public E peekLast() | |
| poll | back to summary |
|---|---|
| public E poll() | |
| pollFirst | back to summary |
|---|---|
| public E pollFirst() | |
| pollLast | back to summary |
|---|---|
| public E pollLast() | |
| pop | back to summary |
|---|---|
| public E pop() | |
| push | back to summary |
|---|---|
| public void push(E e) | |
| remove | back to summary |
|---|---|
| public E remove() | |
| remove | back to summary |
|---|---|
| public boolean remove(E value) Implements org. | |
| remove | back to summary |
|---|---|
| public E remove(int index) Implements abstract org. Implements org. | |
| removeFirst | back to summary |
|---|---|
| public E removeFirst() throws NoSuchElementException | |
| removeFirstOccurrence | back to summary |
|---|---|
| public boolean removeFirstOccurrence(E o) | |
| removeLast | back to summary |
|---|---|
| public E removeLast() throws NoSuchElementException | |
| removeLastOccurrence | back to summary |
|---|---|
| public boolean removeLastOccurrence(E o) | |
| resetCapacity | back to summary |
|---|---|
| private void resetCapacity() | |
| set | back to summary |
|---|---|
| public E set(int i, E o) throws IndexOutOfBoundsException Implements org. | |
| size | back to summary |
|---|---|
| public int size() Implements abstract org. Implements org. | |
| toArray | back to summary |
|---|---|
| public <T> T[] toArray(T[] array) | |
| toArray | back to summary |
|---|---|
| public Object[] toArray() | |