Class Node

java.lang.Object
  |
  +--Node
All Implemented Interfaces:
java.io.Serializable

public class Node
extends java.lang.Object
implements java.io.Serializable

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

See Also:
Serialized Form

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

data

public java.lang.Object data
The actual data that is referenced by the Node.


next

public Node next
A reference to the next node in the Nodelist.


back

public Node back
A reference to the previous node in the Nodelist.

Constructor Detail

Node

public Node()
Basic constructor.


Node

public Node(java.lang.Object x)
Constructor built with a reference only to the data it tags.


Node

public 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. This constructor is necessary for inserting the newly constructed node into an existing Nodelist.