data_structures_free
This commit is contained in:
17
net/datastructures/Sequence.java
Normal file
17
net/datastructures/Sequence.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package net.datastructures;
|
||||
//begin#fragment Sequence
|
||||
/**
|
||||
* An interface for a sequence, a data structure supporting all
|
||||
* operations of a deque, indexed list and position list.
|
||||
//end#fragment Sequence
|
||||
* @author Roberto Tamassia, Michael Goodrich
|
||||
//begin#fragment Sequence
|
||||
*/
|
||||
public interface Sequence<E>
|
||||
extends Deque<E>, IndexList<E>, PositionList<E> {
|
||||
/** Returns the position containing the element at the given index. */
|
||||
public Position<E> atIndex(int r) throws BoundaryViolationException;
|
||||
/** Returns the index of the element stored at the given position. */
|
||||
public int indexOf(Position<E> p) throws InvalidPositionException;
|
||||
}
|
||||
//end#fragment Sequence
|
||||
Reference in New Issue
Block a user