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