/**
   The Vector interface specifies a sequence of elements that 
   supports access to its elements by their ranks.  The vector can
   be changed.
   A rank is invalid if it is smaller than 0 or greater than or equal 
   to the size of the ranked sequence.

   @author      Franck van Breugel
   @version     1.6    March 2, 2001
*/
public interface Vector extends InspectableVector
{
    /**
       Returns the element of this vector with the specified rank 
       and replaces that element with the specified element.

       @param rank The rank of the element to be replaced.
       @param element The replacement element.
       @return The element of this vector with the specified rank.
       @exception BoundaryViolationException if the specified rank is invalid.
    */ 
    public Object replaceAtRank(int rank, Object element) throws BoundaryViolationException;

    /**
       Inserts the specified element at the specified rank in this
       vector.

       @param rank The rank at which the element is to be inserted.
       @param element The element to be inserted.
       @exception BoundaryViolationException if the specified rank is invalid
       and differs from the size of this vector.
    */ 
    public void insertAtRank(int rank, Object element) throws BoundaryViolationException;

    /**
       Returns the element of this vector with the specified rank
       and removes this element from this ranked sequence.

       @param rank The rank at which the element is to be removed.
       @return The element of this vector with the specified rank.
       @exception BoundaryViolationException if the specified rank is invalid.
    */ 
    public Object removeAtRank(int rank) throws BoundaryViolationException;
}


