fi.joensuu.cs.tra
Class ListNode<E>

java.lang.Object
  extended by fi.joensuu.cs.tra.ListNode

public class ListNode<E>
extends Object


Constructor Summary
ListNode()
          Creates an empty, unlinked ListNode.
ListNode(E element)
          Creates an unlinked ListNode with the specified element.
 
Method Summary
 E getElement()
          Returns this ListNode's element.
 ListNode<E> getNext()
          Returns this ListNode's next node.
 ListNode<E> getPrevious()
          Returns this ListNode's previous node.
 E setElement(E element)
          Sets this ListNode's element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListNode

public ListNode()
Creates an empty, unlinked ListNode.


ListNode

public ListNode(E element)
Creates an unlinked ListNode with the specified element.

Parameters:
element - the element for the new ListNode.
Method Detail

setElement

public E setElement(E element)
Sets this ListNode's element.

Parameters:
element - the new element for this node.
Returns:
the old element or null if none.

getElement

public E getElement()
Returns this ListNode's element.

Returns:
this node's element or null if none.

getNext

public ListNode<E> getNext()
Returns this ListNode's next node.

Returns:
this node's next node or null if none.

getPrevious

public ListNode<E> getPrevious()
Returns this ListNode's previous node.

Returns:
this node's previous node or null if none.