|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents deques of int values. Deques are lists that have specialized (and efficient) methods for adding and removing elements from the beginning and end.
LinkedList
,
IntStack
Method Summary | |
void |
addFirst(int v)
Adds an element to the beginning of this deque. |
void |
addLast(int v)
Adds an element to the end of this deque. |
int |
getFirst()
Returns the first element of this deque. |
int |
getLast()
Returns the last element of this deque. |
int |
removeFirst()
Removes the first element of this deque. |
int |
removeLast()
Removes the last element of this deque. |
Methods inherited from interface bak.pcj.list.IntList |
add, addAll, get, indexOf, indexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, removeElementAt, set |
Methods inherited from interface bak.pcj.IntCollection |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, trimToSize |
Method Detail |
public int getFirst()
IndexOutOfBoundsException
- if this deque is empty.public int getLast()
IndexOutOfBoundsException
- if this deque is empty.public int removeFirst()
IndexOutOfBoundsException
- if this deque is empty.public int removeLast()
IndexOutOfBoundsException
- if this deque is empty.public void addFirst(int v)
v
- the element to add to this deque.public void addLast(int v)
v
- the element to add to this deque.
|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |