|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--Opus5.LinkedList
A linear, singly-linked list of Objects.
| Inner Class Summary | |
class |
LinkedList.Element
An element of a linked list. |
| Field Summary | |
protected LinkedList.Element |
head
The head of the linked list. |
protected LinkedList.Element |
tail
The tail of the linked list. |
| Constructor Summary | |
LinkedList()
Constructs an empty LinkedList. |
|
| Method Summary | |
void |
append(java.lang.Object item)
Appends to this list a list element that contains the specified object. |
void |
assign(LinkedList list)
Assigns to this linked list the value of the specified linked list. |
void |
extract(java.lang.Object item)
Extracts from this linked list the list element that contains the specified object. |
java.lang.Object |
getFirst()
Returns the object contained in the first list element. |
LinkedList.Element |
getHead()
Returns the head of this linked list. |
java.lang.Object |
getLast()
Returns the object contained in the last list element. |
LinkedList.Element |
getTail()
Returns the tail of this linked list. |
boolean |
isEmpty()
Tests if this linked list is empty. |
void |
prepend(java.lang.Object item)
Prepends to this list a list element that contains the specified object. |
void |
purge()
Empties this linked list. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected LinkedList.Element head
protected LinkedList.Element tail
| Constructor Detail |
public LinkedList()
LinkedList.| Method Detail |
public void purge()
public LinkedList.Element getHead()
public LinkedList.Element getTail()
public boolean isEmpty()
public java.lang.Object getFirst()
ContainerEmptyException - If this list is empty.public java.lang.Object getLast()
ContainerEmptyException - If this list is empty.public void prepend(java.lang.Object item)
item - The object to be prepended.public void append(java.lang.Object item)
item - The object to be appended.public void assign(LinkedList list)
list - The linked list to assign to this linked list.public void extract(java.lang.Object item)
item - The object to be extracted from this linked list.java.lang.IllegalArgumentException - If the object to extract is not found in this linked list.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||