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