|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectLLNode
Field Summary | |
LLNode |
next
The next branch/node/whatever to process |
Constructor Summary | |
LLNode()
Constructor for LLNode just sets next to null |
Method Summary | |
void |
add(LLNode node)
Add the input node after the last node in this list. |
int |
count()
Return the count of the elements in the list |
LLNode |
getNext()
|
void |
insertAfter(LLNode node)
Insert the input node after this node. |
LLNode |
last()
Return the last element in the list |
void |
remove(LLNode node)
Method to remove node from list, fixing links appropriately. |
LLNode |
reverse()
Reverse the list starting at this, and return the last element of the list. |
LLNode |
reverse2()
Reverse2: Push all the elements on the stack, then pop all the elements off the stack. |
void |
setNext(LLNode nextOne)
Methods to set and get next elements |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public LLNode next
Constructor Detail |
public LLNode()
Method Detail |
public void setNext(LLNode nextOne)
nextOne
- next element in listpublic LLNode getNext()
public void remove(LLNode node)
node
- element to remove from list.public void insertAfter(LLNode node)
node
- element to insert after this.public LLNode last()
public int count()
public void add(LLNode node)
node
- element to insert after this.public LLNode reverse()
public LLNode reverse2()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |