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