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