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

Method Index

 o getNext()
Returns a reference to the next element in the list.
 o getPrevious()
Returns a reference to the previous element in the list.
 o setNext(Linkable)
Establishes a link to the next element in the list.
 o setPrevious(Linkable)
Establishes a link to the previous element in the list.

Methods

 o 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.
 o 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.
 o 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.
 o 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