|
||||||||||
| 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
edu.emory.mathcs.backport.java.util.LinkedList
| Constructor Summary | |
LinkedList()
|
|
LinkedList(java.util.Collection c)
|
|
| Method Summary | |
void |
add(int index,
java.lang.Object element)
|
boolean |
add(java.lang.Object o)
Inserts the specified element into the queue represented by this deque (in other words, at the tail of this deque) if it is possible to do so immediately without violating capacity restrictions, returning true upon success and throwing an IllegalStateException if no space is currently available. |
boolean |
addAll(java.util.Collection c)
|
boolean |
addAll(int index,
java.util.Collection c)
|
void |
addFirst(java.lang.Object e)
Inserts the specified element at the front of this deque if it is possible to do so immediately without violating capacity restrictions. |
void |
addLast(java.lang.Object e)
Inserts the specified element at the end of this deque if it is possible to do so immediately without violating capacity restrictions. |
void |
clear()
|
java.lang.Object |
clone()
|
boolean |
contains(java.lang.Object o)
Returns true if this deque contains the specified element. |
java.util.Iterator |
descendingIterator()
Returns an iterator over the elements in this deque in reverse sequential order. |
java.lang.Object |
element()
Retrieves, but does not remove, the head of the queue represented by this deque (in other words, the first element of this deque). |
java.lang.Object |
get(int index)
|
java.lang.Object |
getFirst()
Retrieves, but does not remove, the first element of this deque. |
java.lang.Object |
getLast()
Retrieves, but does not remove, the last element of this deque. |
int |
indexOf(java.lang.Object o)
|
boolean |
isEmpty()
|
int |
lastIndexOf(java.lang.Object o)
|
java.util.ListIterator |
listIterator()
|
java.util.ListIterator |
listIterator(int index)
|
boolean |
offer(java.lang.Object e)
Inserts the specified element into the queue represented by this deque (in other words, at the tail of this deque) if it is possible to do so immediately without violating capacity restrictions, returning true upon success and false if no space is currently available. |
boolean |
offerFirst(java.lang.Object e)
Inserts the specified element at the front of this deque unless it would violate capacity restrictions. |
boolean |
offerLast(java.lang.Object e)
Inserts the specified element at the end of this deque unless it would violate capacity restrictions. |
java.lang.Object |
peek()
Retrieves, but does not remove, the head of the queue represented by this deque (in other words, the first element of this deque), or returns null if this deque is empty. |
java.lang.Object |
peekFirst()
Retrieves, but does not remove, the first element of this deque, or returns null if this deque is empty. |
java.lang.Object |
peekLast()
Retrieves, but does not remove, the last element of this deque, or returns null if this deque is empty. |
java.lang.Object |
poll()
Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), or returns null if this deque is empty. |
java.lang.Object |
pollFirst()
Retrieves and removes the first element of this deque, or returns null if this deque is empty. |
java.lang.Object |
pollLast()
Retrieves and removes the last element of this deque, or returns null if this deque is empty. |
java.lang.Object |
pop()
Pops an element from the stack represented by this deque. |
void |
push(java.lang.Object e)
Pushes an element onto the stack represented by this deque (in other words, at the head of this deque) if it is possible to do so immediately without violating capacity restrictions, returning true upon success and throwing an IllegalStateException if no space is currently available. |
java.lang.Object |
remove()
Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque). |
java.lang.Object |
remove(int index)
|
boolean |
remove(java.lang.Object o)
Removes the first occurrence of the specified element from this deque. |
java.lang.Object |
removeFirst()
Retrieves and removes the first element of this deque. |
boolean |
removeFirstOccurrence(java.lang.Object o)
Removes the first occurrence of the specified element from this deque. |
java.lang.Object |
removeLast()
Retrieves and removes the last element of this deque. |
boolean |
removeLastOccurrence(java.lang.Object o)
Removes the last occurrence of the specified element from this deque. |
java.lang.Object |
set(int index,
java.lang.Object element)
|
int |
size()
Returns the number of elements in this deque. |
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
| Methods inherited from class java.util.AbstractSequentialList |
iterator |
| Methods inherited from class java.util.AbstractList |
equals, hashCode, removeRange, subList |
| Methods inherited from class java.util.AbstractCollection |
containsAll, 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, iterator, removeAll, retainAll, subList |
| Methods inherited from interface edu.emory.mathcs.backport.java.util.Deque |
iterator |
| Constructor Detail |
public LinkedList()
public LinkedList(java.util.Collection c)
| Method Detail |
public int size()
Deque
size in interface java.util.Listpublic boolean isEmpty()
isEmpty in interface java.util.Listpublic boolean contains(java.lang.Object o)
Deque
contains in interface java.util.Listpublic int indexOf(java.lang.Object o)
indexOf in interface java.util.Listpublic int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.Listpublic java.lang.Object[] toArray()
toArray in interface java.util.Listpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.Listpublic boolean add(java.lang.Object o)
Dequeoffer.
This method is equivalent to Deque.addLast(java.lang.Object).
add in interface java.util.Listpublic boolean remove(java.lang.Object o)
DequeThis method is equivalent to Deque.removeFirstOccurrence(java.lang.Object).
remove in interface java.util.Listpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.List
public boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.Listpublic void clear()
clear in interface java.util.Listpublic java.lang.Object get(int index)
get in interface java.util.List
public java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.List
public void add(int index,
java.lang.Object element)
add in interface java.util.Listpublic java.lang.Object remove(int index)
remove in interface java.util.Listpublic java.util.ListIterator listIterator()
listIterator in interface java.util.Listpublic java.util.ListIterator listIterator(int index)
listIterator in interface java.util.Listpublic void addFirst(java.lang.Object e)
DequeDeque.offerFirst(java.lang.Object).
addFirst in interface Dequee - the element to addpublic void addLast(java.lang.Object e)
DequeDeque.offerLast(java.lang.Object).
This method is equivalent to Deque.add(java.lang.Object).
addLast in interface Dequee - the element to addpublic boolean offerFirst(java.lang.Object e)
DequeDeque.addFirst(java.lang.Object) method,
which can fail to insert an element only by throwing an exception.
offerFirst in interface Dequee - the element to add
public boolean offerLast(java.lang.Object e)
DequeDeque.addLast(java.lang.Object) method,
which can fail to insert an element only by throwing an exception.
offerLast in interface Dequee - the element to add
public java.lang.Object removeFirst()
DequepollFirst only in that it throws an
exception if this deque is empty.
removeFirst in interface Dequepublic java.lang.Object removeLast()
DequepollLast only in that it throws an
exception if this deque is empty.
removeLast in interface Dequepublic java.lang.Object pollFirst()
Deque
pollFirst in interface Dequepublic java.lang.Object pollLast()
Deque
pollLast in interface Dequepublic java.lang.Object getFirst()
DequepeekFirst only in that it
throws an exception if this deque is empty.
getFirst in interface Dequepublic java.lang.Object getLast()
DequepeekLast only in that it
throws an exception if this deque is empty.
getLast in interface Dequepublic java.lang.Object peekFirst()
Deque
peekFirst in interface Dequepublic java.lang.Object peekLast()
Deque
peekLast in interface Dequepublic boolean removeFirstOccurrence(java.lang.Object o)
Deque
removeFirstOccurrence in interface Dequeo - element to be removed from this deque, if present
public boolean removeLastOccurrence(java.lang.Object o)
Deque
removeLastOccurrence in interface Dequeo - element to be removed from this deque, if present
public boolean offer(java.lang.Object e)
DequeDeque.add(java.lang.Object) method, which can fail to
insert an element only by throwing an exception.
This method is equivalent to Deque.offerLast(java.lang.Object).
offer in interface Dequee - the element to add
public java.lang.Object remove()
Dequepoll only in that it throws an
exception if this deque is empty.
This method is equivalent to Deque.removeFirst().
remove in interface Dequepublic java.lang.Object poll()
DequeThis method is equivalent to Deque.pollFirst().
poll in interface Dequepublic java.lang.Object element()
Dequepeek only in that it throws an
exception if this deque is empty.
This method is equivalent to Deque.getFirst().
element in interface Dequepublic java.lang.Object peek()
DequeThis method is equivalent to Deque.peekFirst().
peek in interface Dequepublic void push(java.lang.Object e)
DequeThis method is equivalent to Deque.addFirst(java.lang.Object).
push in interface Dequee - the element to pushpublic java.lang.Object pop()
DequeThis method is equivalent to Deque.removeFirst().
pop in interface Dequepublic java.util.Iterator descendingIterator()
Deque
descendingIterator in interface Dequepublic java.lang.Object clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||