|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList<E>
java.util.LinkedList<E>
fi.joensuu.cs.tra.LinkedDeque<E>
public class LinkedDeque<E>
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(java.util.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(java.util.Collection<? extends E> c)
c - the collection whose elements are to be placed into this deque.
java.lang.NullPointerException - if the specified collection was null.| Method Detail |
|---|
public void addFirst(E o)
addFirst in class java.util.LinkedList<E>o - the element to be inserted.public void addLast(E o)
addLast in class java.util.LinkedList<E>o - the element to be inserted.public void clear()
clear in interface java.util.Collection<E>clear in interface java.util.List<E>clear in class java.util.LinkedList<E>public E getFirst()
getFirst in class java.util.LinkedList<E>public E getLast()
getLast in class java.util.LinkedList<E>public E removeFirst()
removeFirst in class java.util.LinkedList<E>public E removeLast()
removeLast in class java.util.LinkedList<E>
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||