/**
 * Something that can be used to look at all the elements in a list.
 *
 * @author Alex Leach
 * @author Yvonne Palm
 * @author Samuel A. Rebelsky
 * @author Jonathan "JWells" Wellons
 */
public interface ListIterator
{
  /**
   * Advance the iterator to the next element.
   */
  public void advance();

  /**
   * Get the current value.
   */
  public Object current();

  /** 
   * Delete the thing the iterator currently refers to and 
   * advance the iterator to the next element.  Return the 
   * deleted value.
   */
  public Object delete();

  /**
   * Advance the iterator to a particular value.  If the value
   * does not appear in the list, move the iterator off the list.
   */
  public void find(Object findMe);

  /**
   * Insert a value before the current value.
   */
  public void insertBefore(Object newValue);

  /**
   * Insert a value after the current value.
   */
  public void insertAfter(Object newValue);

  /**
   * Replace the current value.  Return the old value.
   */
  public Object replace(Object newValue);

  /** 
   * Determine if we're still in the middle of the list.
   */
  public boolean isValid();
    
} // interface ListIterator
