|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweiss.nonstandard.LinkedList<AnyType>
public class LinkedList<AnyType>
Linked list implementation of the list using a header node. Access to the list is via LinkedListIterator.
LinkedListIterator
Constructor Summary | |
---|---|
LinkedList()
Construct the list |
Method Summary | ||
---|---|---|
LinkedListIterator<AnyType> |
find(AnyType x)
Return iterator corresponding to the first node containing an item. |
|
LinkedListIterator<AnyType> |
findPrevious(AnyType x)
Return iterator prior to the first node containing an item. |
|
LinkedListIterator<AnyType> |
first()
Return an iterator representing the first node in the list. |
|
void |
insert(AnyType x,
LinkedListIterator<AnyType> p)
Insert after p. |
|
boolean |
isEmpty()
Test if the list is logically empty. |
|
static
|
listSize(LinkedList<AnyType> theList)
|
|
static void |
main(java.lang.String[] args)
|
|
void |
makeEmpty()
Make the list logically empty. |
|
static
|
printList(LinkedList<AnyType> theList)
|
|
void |
remove(AnyType x)
Remove the first occurrence of an item. |
|
LinkedListIterator<AnyType> |
zeroth()
Return an iterator representing the header node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinkedList()
Method Detail |
---|
public boolean isEmpty()
public void makeEmpty()
public LinkedListIterator<AnyType> zeroth()
public LinkedListIterator<AnyType> first()
public void insert(AnyType x, LinkedListIterator<AnyType> p)
x
- the item to insert.p
- the position prior to the newly inserted item.public LinkedListIterator<AnyType> find(AnyType x)
x
- the item to search for.
public LinkedListIterator<AnyType> findPrevious(AnyType x)
x
- the item to search for.
public void remove(AnyType x)
x
- the item to remove.public static <AnyType> void printList(LinkedList<AnyType> theList)
public static <AnyType> int listSize(LinkedList<AnyType> theList)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |