/**
 * The List interface specifies a sequence of elements of
 * which each element is associated with a position.  The
 * sequence can be changed.
 *
 * @version     1.4	March 2, 2001
 * @author      Franck van Breugel
 * @see Position
 */
public interface List extends InspectableList, PositionalContainer
{
    /**
     * Inserts the specified element at the beginning of this sequence and 
     * returns its position.
     * @param element The element to be inserted.
     * @result The position of the inserted element.
     */
    public Position insertFirst(Object element);

    /**
     * Inserts the specified element at the end of this sequence and returns 
     * its position.
     * @param element The element to be inserted.
     * @result The position of the inserted element.
     */
    public Position insertLast(Object element);

    /**
     * Inserts the specified element before the specified position of this 
     * sequence and returns its position.
     * @param element The element to be inserted.
     * @param position The position before which the element is to be inserted.
     * @result The position of the inserted element.
     */
    public Position insertBefore(Position position, Object element);

    /**
     * Inserts the specified element after the specified position of this 
     * sequence and returns its position.
     * @param element The element to be inserted.
     * @param position The position after which the element is to be inserted.
     * @result The position of the inserted element.
     */
    public Position insertAfter(Position position, Object element);

    /**
     * Removes the specified position from this sequence and returns its element.
     * @param position The position to be removed.
     * @return The element of the removed position.
     */
    public Object remove(Position position);
}
