datastructures

net.datastructures
Class Node

java.lang.Object
  extended bynet.datastructures.Node

public class Node
extends Object

Node of a singly linked list, which stores references to its element and to the next node in the list.

Author:
Natasha Gelfand, Roberto Tamassia, Michael Goodrich

Constructor Summary
Node()
          Creates a node with null references to its element and next node.
Node(Object e, Node n)
          Creates a node with the given element and next node.
 
Method Summary
 Object getElement()
           
 Node getNext()
           
 void setElement(Object newElem)
           
 void setNext(Node newNext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

public Node()
Creates a node with null references to its element and next node.


Node

public Node(Object e,
            Node n)
Creates a node with the given element and next node.

Method Detail

getElement

public Object getElement()

getNext

public Node getNext()

setElement

public void setElement(Object newElem)

setNext

public void setNext(Node newNext)

datastructures