|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Node
Simple Node class that includes three references: two to Nodes and one to an Object.
This data structure is intended to be used in a linked list of mine called Nodelist
.
Nodelist
uses Nodes to build a linked list by having one reference of each Node to refer
to a previus Node, one reference to refer forward to the next Node and one reference
to refer to a piece of data. The instance variables are public and are used by other classes
for rereferencing Nodes (and thus, the structure of the linked list).
Author: Neil Short, neshort@yahoo.com
Field Summary | |
Node |
back
A reference to the previous node in the Nodelist . |
java.lang.Object |
data
The actual data that is referenced by the Node. |
Node |
next
A reference to the next node in the Nodelist . |
Constructor Summary | |
Node()
Basic constructor. |
|
Node(java.lang.Object x)
Constructor built with a reference only to the data it tags. |
|
Node(java.lang.Object x,
Node linkb,
Node linkn)
The full constructor that is built with data and references to two other nodes of this type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.lang.Object data
public Node next
Nodelist
.
public Node back
Nodelist
.
Constructor Detail |
public Node()
public Node(java.lang.Object x)
public Node(java.lang.Object x, Node linkb, Node linkn)
Nodelist
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |