All Packages Class Hierarchy This Package Previous Next Index
Interface rpi.goldsd.container.Linkable
- public interface Linkable
The Linkable interface defines the methods required by any
object that can be linked into a linked list or other such linked
structure. Note that the Linkable interface defines methods
for a doubly-linked structure. If a singly-linked structure is to be
used, the getPrevious() and setPrevious() methods
may be implemented as empty methods.
- Version:
- 1.0, 3/15/98
- Author:
- David Goldschmidt
- See Also:
- ListNode, LinkedList
-
getNext()
- Returns a reference to the next element in the list.
-
getPrevious()
- Returns a reference to the previous element in the list.
-
setNext(Linkable)
- Establishes a link to the next element in the list.
-
setPrevious(Linkable)
- Establishes a link to the previous element in the list.
getNext
public abstract Linkable getNext()
- Returns a reference to the next element in the list.
- Returns:
- a reference to the next element in the list.
getPrevious
public abstract Linkable getPrevious()
- Returns a reference to the previous element in the list.
- Returns:
- a reference to the previous element in the list.
setNext
public abstract void setNext(Linkable node)
- Establishes a link to the next element in the list.
- Parameters:
- node - a reference to the next element in the list to
be linked to this Linkable object.
setPrevious
public abstract void setPrevious(Linkable node)
- Establishes a link to the previous element in the list.
- Parameters:
- node - a reference to the previous element in the list
to be linked to this Linkable object.
All Packages Class Hierarchy This Package Previous Next Index