Interface | osid.OsidList | ||
---|---|---|---|
Description |
Osid lists are a once pass through iteration of elements. The size of the object set and the means in which the element set is generated or stored is not known. Assumptions based on the length of the element set by copying the entire contents of the list into a fixed buffer should be done with caution a awareness that an implementation may return a number of elements ranging from zero to infinity. Lists are returned by methods when multiple return values are possible. There is no guarantee that successive calls to the same method will return the same set of elements in a list. Unless an order is specified in an interface definition, the order of the elements is not known. | ||
Method | hasNext | ||
Description |
Tests if there are more elements in this list. | ||
Return | boolean | true if more elements are available in this list,
false if the end of the list has been reached | |
Compliance | mandatory | This method must be implemented. | |
Provider Notes |
Any errors that may result from accesing the underlying
set of elements are to be deferred until the consumer
attempts retrieval in which case the provider must return
| ||
Method | available | ||
Description |
Gets the number of elements available for retrieval.
The number returned by this method may be less than or
equal to the total number of elements in this list. To
determine if the end of the list has been reached, the
method This method does not imply asynchronous usage. All OSID methods may block. | ||
Return | cardinal | the number of elements available for retrieval | |
Compliance | mandatory | This method must be implemented. | |
Provider Notes |
Any errors that may result from accesing the underlying set of elements are to be deferred until the consumer attempts retrieval in which case the provider must return a positive integer for this method so the consumer can continue execution to receive the error. In all other circumstances, the provider must not return a number greater than the number of elements known since this number will be fed as a parameter to the bulk retrieval method. | ||
Method | skip | ||
Description |
Skip the specified number of elements in the list. If the number skipped is greater than the number of elements in the list, hasNext() becomes false and available() returns zero as there are no more elements to retrieve. | ||
Parameters | cardinal | n | the number of elements to skip |
Compliance | mandatory | This method must be implemented. |