|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.squawk.util.SimpleLinkedList
public final class SimpleLinkedList
A Stripped down version of the standard J2SE java.util.LinkedList class. Can be useds as a FIFO queue by adding and removing from opposite ends. This class is NOT synchronized.
Constructor Summary | |
---|---|
SimpleLinkedList()
Constructs an empty list. |
Method Summary | |
---|---|
void |
addFirst(Object o)
Inserts the given element at the beginning of this list. |
void |
addLast(Object o)
Appends the given element to the end of this list. |
void |
clear()
Removes all of the elements from this list. |
boolean |
contains(Object o)
Returns true if this list contains the specified element. |
Enumeration |
elements()
Returns an enumeration of the components of this vector. |
Object |
getFirst()
Returns the first element in this list. |
Object |
getLast()
Returns the last element in this list. |
int |
indexOf(Object o)
Returns the index in this list of the first occurrence of the specified element, or -1 if the List does not contain this element. |
boolean |
remove(Object o)
Removes the first occurrence of the specified element in this list. |
Object |
removeFirst()
Removes and returns the first element from this list. |
Object |
removeLast()
Removes and returns the last element from this list. |
int |
size()
Returns the number of elements in this list. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleLinkedList()
Method Detail |
---|
public Object getFirst()
IllegalStateException
- if this list is empty.public Object getLast()
IllegalStateException
- if this list is empty.public Object removeFirst()
IllegalStateException
- if this list is empty.public Object removeLast()
IllegalStateException
- if this list is empty.public void addFirst(Object o)
o
- the element to be inserted at the beginning of this list.public void addLast(Object o)
o
- the element to be inserted at the end of this list.public final int size()
public boolean remove(Object o)
o
- element to be removed from this list, if present.
public boolean contains(Object o)
o
- element whose presence in this list is to be tested.
public int indexOf(Object o)
o
- element to search for.
public void clear()
public Enumeration elements()
Enumeration
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |