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