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, sizePosition<E> atIndex(int r) throws BoundaryViolationException
BoundaryViolationExceptionint indexOf(Position<E> p) throws InvalidPositionException
InvalidPositionException