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