public interface PositionList extends OsidList
Like all OsidLists, PositionList provides
a means for accessing Position elements sequentially either
one at a time or many at a time. Examples:
while (pl.hasNext()) {
Position position = pl.getNextPosition();
}
or
while (pl.hasNext()) {
Position[] positions = pl.getNextPositions(pl.available());
}
| Modifier and Type | Method and Description |
|---|---|
Position |
getNextPosition()
Gets the next
Position in this list. |
Position[] |
getNextPositions(long n)
Gets the next set of
Position elements in this list. |
Position getNextPosition() throws OperationFailedException
Position in this list. Position in this list. The
hasNext() method should be used to test that a next
Position is available before calling this
method.IllegalStateException - no more elements available in
this listOperationFailedException - unable to complete requestmandatory - This method must be implemented. Position[] getNextPositions(long n) throws OperationFailedException
Position elements in this list.
The specified amount must be less than or equal to the return from
available(). n - the number of Position elements requested
which must be less than or equal to available() Position elements.
The length of the array is less than or equal to the number
specified.IllegalStateException - no more elements available in
this listOperationFailedException - unable to complete requestmandatory - This method must be implemented.