|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--Node
A singly-linked Node. Contains an Object and a reference to the next Node.
| Constructor Summary | |
Node(Object contents)
Creates a new Node with no links. |
|
Node(Object contents,
Node next)
Create a new node with the given contents and link to another (next) node. |
|
| Method Summary | |
Node |
getNext()
Returns the next node in a list after this node. |
Object |
getValue()
Returns this node's contents. |
void |
setNext(Node next)
Set this node's next reference to the given node. |
void |
setValue(Object value)
Sets this node to contain the given value |
String |
toString()
Returns a String representation of this node, including the value contained, as well as the value of the next node (if any). |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public Node(Object contents)
public Node(Object contents,
Node next)
| Method Detail |
public void setValue(Object value)
value - The new contents of this node.public Object getValue()
public Node getNext()
public void setNext(Node next)
next - The node this node should point to as next in a list.public String toString()
toString in class Object
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||