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