Implementato NodeSequence e aggiunto alcuni costruttori alle eccezioni

This commit is contained in:
2014-03-30 16:56:16 +02:00
parent 148933ac58
commit c25afb02a2
8 changed files with 294 additions and 2 deletions

24
sequence/Sequence.java Normal file
View File

@@ -0,0 +1,24 @@
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;
}