|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.AbstractSequentialList
java.util.LinkedList
fi.joensuu.cs.tra.LinkedDeque
LinkedDeque extends java.util.LinkedList to highlight Deque behaviour.
LinkedList,
Serialized Form| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
LinkedDeque()
Creates an empty list. |
|
LinkedDeque(Collection<? extends E> c)
Constructs a deque containing the elements of the specified collection, in the order they are returned by the collection's iterator. |
|
| Method Summary | |
|---|---|
void |
addFirst(E o)
Inserts the given element to the front of this deque. |
void |
addLast(E o)
Inserts the given element to the rear of this deque. |
void |
clear()
Removes all the elements from this deque. |
E |
getFirst()
Returns but does not remove the element at the front of this deque. |
E |
getLast()
Returns but does not remove the element at the rear of this deque. |
E |
removeFirst()
Removes and returns the element at the front of this deque. |
E |
removeLast()
Removes and returns the element at the rear of this deque. |
| Methods inherited from class java.util.LinkedList |
|---|
add, add, addAll, addAll, clone, contains, element, get, indexOf, lastIndexOf, listIterator, offer, peek, poll, remove, remove, remove, set, size, toArray, toArray |
| Methods inherited from class java.util.AbstractSequentialList |
|---|
iterator |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, listIterator, removeRange, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, isEmpty, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList |
| Constructor Detail |
|---|
public LinkedDeque()
public LinkedDeque(Collection<? extends E> c)
c - the collection whose elements are to be placed into this deque.
NullPointerException - if the specified collection was null.| Method Detail |
|---|
public void addFirst(E o)
addFirst in class LinkedListo - the element to be inserted.public void addLast(E o)
addLast in class LinkedListo - the element to be inserted.public void clear()
clear in interface Listclear in class LinkedListpublic E getFirst()
getFirst in class LinkedListpublic E getLast()
getLast in class LinkedListpublic E removeFirst()
removeFirst in class LinkedListpublic E removeLast()
removeLast in class LinkedList
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||