edu.hawaii.ics.yucheng
Class LinkedListQueue.Node<T>

java.lang.Object
  extended by edu.hawaii.ics.yucheng.LinkedListQueue.Node<T>
Enclosing class:
LinkedListQueue<T>

private static class LinkedListQueue.Node<T>
extends java.lang.Object

A node class for the generic queue.


Field Summary
private  LinkedListQueue.Node<T> myNext
          A pointer to the next node.
 T value
          The value stored in the node.
 
Constructor Summary
LinkedListQueue.Node(T value)
          Initializes a new instance of the class.
LinkedListQueue.Node(T value, LinkedListQueue.Node<T> next)
          Initializes a new instance of the class.
 
Method Summary
 LinkedListQueue.Node<T> next()
          Returns a pointer to the next node.
 void setNext(LinkedListQueue.Node<T> next)
          Sets the pointer to the next node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myNext

private LinkedListQueue.Node<T> myNext
A pointer to the next node.


value

public final T value
The value stored in the node.

Constructor Detail

LinkedListQueue.Node

public LinkedListQueue.Node(T value)
Initializes a new instance of the class.

Parameters:
value - The value stored in the node.

LinkedListQueue.Node

public LinkedListQueue.Node(T value,
                            LinkedListQueue.Node<T> next)
Initializes a new instance of the class.

Parameters:
value - The value stored in the node.
next - A pointer to the next node.
Method Detail

next

public LinkedListQueue.Node<T> next()
Returns a pointer to the next node.

Returns:
A pointer to the next node.

setNext

public void setNext(LinkedListQueue.Node<T> next)
Sets the pointer to the next node.

Parameters:
next - A pointer to the next node.