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