/**
   The InspectableList interface specifies a sequence of elements of
   which each element is associated with a position.  The sequence
   cannot be changed.
  
   @author      Franck van Breugel
   @version     1.4	March 2, 2001
   @see Position
*/
public interface InspectableList extends InspectablePositionalContainer 
{

    /**
       Returns the first position of this sequence.

       @return The first position of this sequence.
       @exception EmptyContainerException if this sequence is empty.
    */
    public Position first() throws EmptyContainerException;

    /**
       Returns the last position of this sequence.

       @return The last position of this sequence.
       @exception EmptyContainerException if this sequence is empty.
     */
    public Position last() throws EmptyContainerException;

    /**
       Tests if the specified position is the first position of this
       sequence.

       @param position The position to be tested to be the first position
       of this sequence.
       @return true if the specified position is the first position
       of this sequence, false otherwise.
    */
    public boolean isFirst(Position position);

    /**
       Tests if the specified position is the last position of this
       sequence.

       @param position The position to be tested to be the last position
       of this sequence.
       @return true if the specified position is the last position
       of this sequence, false otherwise.
    */
    public boolean isLast(Position position);

    /**
       Returns the position before the specified position in this sequence.

       @param position The position the predecessor of which is to be returned.
       @return The position before the specified position in this sequence.
       @exception BoundaryViolationException if the specified position is
       the first position of this sequence.
    */
    public Position before(Position position) throws BoundaryViolationException;

    /**
       Returns the position after the specified position in this sequence.

       @param position The position the successor of which is to be returned.
       @return The position after the specified position in this sequence.
       @exception BoundaryViolationException if the specified position is
       the last position of this sequence.
    */
    public Position after(Position position) throws BoundaryViolationException;
}





















