|
||||||||||
| 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
org.compass.core.util.backport.java.util.LinkedList
public class LinkedList
| Constructor Summary | |
|---|---|
LinkedList()
|
|
LinkedList(Collection c)
|
|
| Method Summary | |
|---|---|
void |
add(int index,
Object element)
|
boolean |
add(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(Collection c)
|
boolean |
addAll(int index,
Collection c)
|
void |
addFirst(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(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()
|
Object |
clone()
|
boolean |
contains(Object o)
Returns true if this deque contains the specified element. |
Iterator |
descendingIterator()
Returns an iterator over the elements in this deque in reverse sequential order. |
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). |
Object |
get(int index)
|
Object |
getFirst()
Retrieves, but does not remove, the first element of this deque. |
Object |
getLast()
Retrieves, but does not remove, the last element of this deque. |
int |
indexOf(Object o)
|
boolean |
isEmpty()
|
int |
lastIndexOf(Object o)
|
ListIterator |
listIterator()
|
ListIterator |
listIterator(int index)
|
boolean |
offer(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(Object e)
Inserts the specified element at the front of this deque unless it would violate capacity restrictions. |
boolean |
offerLast(Object e)
Inserts the specified element at the end of this deque unless it would violate capacity restrictions. |
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. |
Object |
peekFirst()
Retrieves, but does not remove, the first element of this deque, or returns null if this deque is empty. |
Object |
peekLast()
Retrieves, but does not remove, the last element of this deque, or returns null if this deque is empty. |
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. |
Object |
pollFirst()
Retrieves and removes the first element of this deque, or returns null if this deque is empty. |
Object |
pollLast()
Retrieves and removes the last element of this deque, or returns null if this deque is empty. |
Object |
pop()
Pops an element from the stack represented by this deque. |
void |
push(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. |
Object |
remove()
Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque). |
Object |
remove(int index)
|
boolean |
remove(Object o)
Removes the first occurrence of the specified element from this deque. |
Object |
removeFirst()
Retrieves and removes the first element of this deque. |
boolean |
removeFirstOccurrence(Object o)
Removes the first occurrence of the specified element from this deque. |
Object |
removeLast()
Retrieves and removes the last element of this deque. |
boolean |
removeLastOccurrence(Object o)
Removes the last occurrence of the specified element from this deque. |
Object |
set(int index,
Object element)
|
int |
size()
Returns the number of elements in this deque. |
Object[] |
toArray()
|
Object[] |
toArray(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 org.compass.core.util.backport.java.util.Deque |
|---|
iterator |
| Constructor Detail |
|---|
public LinkedList()
public LinkedList(Collection c)
| Method Detail |
|---|
public int size()
Deque
size in interface Collectionsize in interface Listsize in interface Dequesize in class AbstractCollectionpublic boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface ListisEmpty in class AbstractCollectionpublic boolean contains(Object o)
Deque
contains in interface Collectioncontains in interface Listcontains in interface Dequecontains in class AbstractCollectiono - element whose presence in this deque is to be tested
public int indexOf(Object o)
indexOf in interface ListindexOf in class AbstractListpublic int lastIndexOf(Object o)
lastIndexOf in interface ListlastIndexOf in class AbstractListpublic Object[] toArray()
toArray in interface CollectiontoArray in interface ListtoArray in class AbstractCollectionpublic Object[] toArray(Object[] a)
toArray in interface CollectiontoArray in interface ListtoArray in class AbstractCollectionpublic boolean add(Object o)
Dequeoffer.
This method is equivalent to Deque.addLast(java.lang.Object).
add in interface Collectionadd in interface Listadd in interface Dequeadd in interface Queueadd in class AbstractListo - the element to add
Collection.add(E))public boolean remove(Object o)
DequeThis method is equivalent to Deque.removeFirstOccurrence(java.lang.Object).
remove in interface Collectionremove in interface Listremove in interface Dequeremove in class AbstractCollectiono - element to be removed from this deque, if present
public boolean addAll(Collection c)
addAll in interface CollectionaddAll in interface ListaddAll in class AbstractCollection
public boolean addAll(int index,
Collection c)
addAll in interface ListaddAll in class AbstractSequentialListpublic void clear()
clear in interface Collectionclear in interface Listclear in class AbstractListpublic Object get(int index)
get in interface Listget in class AbstractSequentialList
public Object set(int index,
Object element)
set in interface Listset in class AbstractSequentialList
public void add(int index,
Object element)
add in interface Listadd in class AbstractSequentialListpublic Object remove(int index)
remove in interface Listremove in class AbstractSequentialListpublic ListIterator listIterator()
listIterator in interface ListlistIterator in class AbstractListpublic ListIterator listIterator(int index)
listIterator in interface ListlistIterator in class AbstractSequentialListpublic void addFirst(Object e)
DequeDeque.offerFirst(java.lang.Object).
addFirst in interface Dequee - the element to addpublic void addLast(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(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(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 Object removeFirst()
DequepollFirst only in that it throws an
exception if this deque is empty.
removeFirst in interface Dequepublic Object removeLast()
DequepollLast only in that it throws an
exception if this deque is empty.
removeLast in interface Dequepublic Object pollFirst()
Deque
pollFirst in interface Dequepublic Object pollLast()
Deque
pollLast in interface Dequepublic Object getFirst()
DequepeekFirst only in that it
throws an exception if this deque is empty.
getFirst in interface Dequepublic Object getLast()
DequepeekLast only in that it
throws an exception if this deque is empty.
getLast in interface Dequepublic Object peekFirst()
Deque
peekFirst in interface Dequepublic Object peekLast()
Deque
peekLast in interface Dequepublic boolean removeFirstOccurrence(Object o)
Deque
removeFirstOccurrence in interface Dequeo - element to be removed from this deque, if present
public boolean removeLastOccurrence(Object o)
Deque
removeLastOccurrence in interface Dequeo - element to be removed from this deque, if present
public boolean offer(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 Dequeoffer in interface Queuee - the element to add
public 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 Dequeremove in interface Queuepublic Object poll()
DequeThis method is equivalent to Deque.pollFirst().
poll in interface Dequepoll in interface Queuepublic 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 Dequeelement in interface Queuepublic Object peek()
DequeThis method is equivalent to Deque.peekFirst().
peek in interface Dequepeek in interface Queuepublic void push(Object e)
DequeThis method is equivalent to Deque.addFirst(java.lang.Object).
push in interface Dequee - the element to pushpublic Object pop()
DequeThis method is equivalent to Deque.removeFirst().
pop in interface Dequepublic Iterator descendingIterator()
Deque
descendingIterator in interface Dequepublic Object clone()
clone in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||