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