Class Node

java.lang.Object
  extended by Node

public class Node
extends java.lang.Object


Constructor Summary
Node(java.lang.String data, Node next)
          Creates a node with the given data, and the given next node.
 
Method Summary
 java.lang.String getData()
          Gets the data stored in the node.
 Node getNext()
          Gets the next node.
 void setNext(Node next)
          Sets the next node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

public Node(java.lang.String data,
            Node next)
Creates a node with the given data, and the given next node.

Parameters:
data - Data to be stored in the node.
Method Detail

setNext

public void setNext(Node next)
Sets the next node.

Parameters:
next - New next node.

getNext

public Node getNext()
Gets the next node.

Returns:
Next node.

getData

public java.lang.String getData()
Gets the data stored in the node.

Returns:
Data stored in the node.