public interface Sequence<E> extends Deque<E>, IndexList<E>, PositionList<E>
Modifier and Type | Method and Description |
---|---|
Position<E> |
atIndex(int r)
Returns the position containing the element at the given index.
|
int |
indexOf(Position<E> p)
Returns the index of the element stored at the given position.
|
addFirst, addLast, getFirst, getLast, isEmpty, removeFirst, removeLast, size
Position<E> atIndex(int r) throws BoundaryViolationException
BoundaryViolationException
int indexOf(Position<E> p) throws InvalidPositionException
InvalidPositionException