Implementato NodeSequence e aggiunto alcuni costruttori alle eccezioni
This commit is contained in:
24
sequence/Sequence.java
Normal file
24
sequence/Sequence.java
Normal 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;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user