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