Opus5
Interface Cursor

All Known Implementing Classes:
OrderedListAsLinkedList.MyCursor, OrderedListAsArray.MyCursor

public interface Cursor

Used to represent a position in an ordered list or a sorted list.

Version:
$Id: Cursor.java,v 3.3 1998/07/29 19:58:33 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.
See Also:
OrderedList, SortedList

Field Summary
static java.lang.String copyright
           
 
Method Summary
 Comparable getDatum()
          Returns the object found at the position of this cursor in the list.
 void insertAfter(Comparable object)
          Inserts an object into the list after this position.
 void insertBefore(Comparable object)
          Inserts an object into the list before this position.
 void withdraw()
          Removes the object found at the position of this cursor from the list.
 

Field Detail

copyright

public static final java.lang.String copyright
Method Detail

getDatum

public Comparable getDatum()
Returns the object found at the position of this cursor in the list.
Returns:
The object found at the position of this cursor.

insertAfter

public void insertAfter(Comparable object)
Inserts an object into the list after this position.
Parameters:
object - The object to be inserted.

insertBefore

public void insertBefore(Comparable object)
Inserts an object into the list before this position.
Parameters:
object - The object to be inserted.

withdraw

public void withdraw()
Removes the object found at the position of this cursor from the list.