Class LinkedListNode<I>

java.lang.Object
  extended by LinkedListNode<I>

public class LinkedListNode<I>
extends java.lang.Object


Constructor Summary
LinkedListNode(I data)
          Constructor LinkedListNode class.
LinkedListNode(I data, LinkedListNode<I> next)
          Constructor that for the Node class
 
Method Summary
 I getData()
          Getter method to obtain a reference to the Object held by the LinkedListNode.
 LinkedListNode<I> getNext()
          Getter method to obtain a reference to the next LinkedListNode in the Linked List.
 void setData(I data)
          Setter method to set the reference to the Object held by the LinkedListNode.
 void setNext(LinkedListNode<I> next)
          Setter method to set the reference to the next LinkedListNode in the Linked List.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkedListNode

public LinkedListNode(I data)
Constructor LinkedListNode class. This constructor initializes the next pointer to null.

Parameters:
data - This is the data Object held by the LinkedListNode.

LinkedListNode

public LinkedListNode(I data,
                      LinkedListNode<I> next)
Constructor that for the Node class

Parameters:
data - This is the data Object held by the Node.
next - This is the pointer to the next LinkedListNode in the Linked List.
Method Detail

getData

public I getData()
Getter method to obtain a reference to the Object held by the LinkedListNode.

Returns:
The Object held by the Node.

setData

public void setData(I data)
Setter method to set the reference to the Object held by the LinkedListNode.

Parameters:
data - The reference to the Object to be held by the LinkedListNode.

getNext

public LinkedListNode<I> getNext()
Getter method to obtain a reference to the next LinkedListNode in the Linked List.

Returns:
The next LinkedListNode in the Linked List.

setNext

public void setNext(LinkedListNode<I> next)
Setter method to set the reference to the next LinkedListNode in the Linked List.

Parameters:
next - The reference to the next LinkedListNode in the Linked List.