|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--LinkedList
Instances of this class are nodes of a linked list.
A linked list is a chain of objects that have two object references associated with them. One is the head of the list, which is another data object. The other is the tail of the list, which is either null or another linked list.
Constructor Summary | |
LinkedList()
This constructor creates a LinkedList with a null head and a null tail. |
|
LinkedList(checkEqualityIF head)
This constructor creates a LinkedList with the given head and a null tail. |
|
LinkedList(checkEqualityIF head,
LinkedList tail)
This constructor creates a LinkedList with the given head and tail. |
Method Summary | |
java.util.Enumeration |
elements()
Return an Enumeration of the data in this linked list (the heads). |
LinkedList |
find(checkEqualityIF target)
Find an object in a linked list that is equal to the given object. |
checkEqualityIF |
getHead()
Return the head of this linked list. |
LinkedList |
getTail()
Return the tail of this linked list. |
int |
size()
Return the number of nodes in this linked list |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public LinkedList()
public LinkedList(checkEqualityIF head)
head
- The object that will be the head of this listpublic LinkedList(checkEqualityIF head, LinkedList tail)
head
- The object that will be the head of this listtail
- null or the rest of this linked list.Method Detail |
public checkEqualityIF getHead()
public LinkedList getTail()
public int size()
public java.util.Enumeration elements()
public LinkedList find(checkEqualityIF target)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |