25 lines
673 B
Java
25 lines
673 B
Java
package sequence;
|
|
|
|
import arraylist.IndexList;
|
|
import position.Position;
|
|
import position.PositionList;
|
|
import exceptions.*;
|
|
|
|
/**
|
|
* Created with MONSTER.
|
|
* User: xgiovio
|
|
* Date: 30/03/2014
|
|
* Time: 14:31
|
|
*/
|
|
public interface Sequence<E> extends PositionList<E>, IndexList<E> {
|
|
public E getFirst() throws EmptySequenceException;
|
|
public E getLast() throws EmptySequenceException;
|
|
public E removeFirst() throws EmptySequenceException;
|
|
public E removeLast() throws EmptySequenceException;
|
|
|
|
public Position<E> atIndex( int index) throws BoundaryViolationException;
|
|
public int indexOf(Position <E> position) throws InvalidPositionException;
|
|
|
|
|
|
}
|