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