goldman.collection.positional
Class SinglyLinkedList.ListItem<E>
java.lang.Object
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.
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