goldman.collection.positional
Class SinglyLinkedList.ListItem<E>

java.lang.Object
  extended by goldman.collection.positional.SinglyLinkedList.ListItem<E>
Direct Known Subclasses:
DoublyLinkedList.DLListItem
Enclosing class:
SinglyLinkedList<E>

public static class SinglyLinkedList.ListItem<E>
extends Object

The ListItem interface must be supported by any class defining objects to be used in a singly linked list or a doubly linked list.


Method Summary
protected  boolean moveNextAfter(SinglyLinkedList.ListItem<E> destination)
          Moves the list item after this one so that it immediately follows the destination
protected  void setNext(SinglyLinkedList.ListItem<E> next)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public String toString()
Overrides:
toString in class Object

setNext

protected void setNext(SinglyLinkedList.ListItem<E> next)
Parameters:
next - the value to update the next reference

moveNextAfter

protected boolean moveNextAfter(SinglyLinkedList.ListItem<E> destination)
Moves the list item after this one so that it immediately follows the destination

Parameters:
destination - a reference to a list item