public interface DirectionList extends OsidList
Like all OsidLists,
DirectionList
provides a means for accessing Direction
elements
sequentially either one at a time or many at a time. Examples:
while (dl.hasNext()) { Direction direction = dl.getNextDirection(); }or
while (dl.hasNext()) { Direction[] directions = dl.getNextDirections(dl.available()); }
Modifier and Type | Method and Description |
---|---|
Direction |
getNextDirection()
Gets the next
Direction in this list. |
Direction[] |
getNextDirections(long n)
Gets the next set of
Direction elements in this list. |
Direction getNextDirection() throws OperationFailedException
Direction
in this list. Direction
in this list. The
hasNext()
method should be used to test that a next
Direction
is available before calling this
method.IllegalStateException
- no more elements available in
this listOperationFailedException
- unable to complete requestmandatory
- This method must be implemented. Direction[] getNextDirections(long n) throws OperationFailedException
Direction
elements in this list.
The specified amount must be less than or equal to the return from
available().
n
- the number of Direction
elements requested
which must be less than or equal to available()
Direction
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.