Interface UpdateResponseList
- All Superinterfaces:
AutoCloseable, Closeable, OsidList, OsidList
Like all OsidLists , UpdateResponseList provides a
means for accessing UpdateResponse elements sequentially either
one at a time or many at a time. Examples:
while (url.hasNext()) {
UpdateResponse response = url.getNextUpdateResponse();
}
or
while (url.hasNext()) {
UpdateResponse[] responses = url.getNextUpdateResponses(url.available());
}
-
Method Details
-
getNextUpdateResponse
Gets the nextUpdateResponsein this list.- Returns:
- the next
UpdateResponsein this list. ThehasNext()method should be used to test that a nextUpdateResponseis available before calling this method. - Throws:
IllegalStateException- no more elements available in this listOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getNextUpdateResponses
Gets the next set ofUpdateResponsesin this list. The specified amount must be less than or equal to the return fromavailable().- Parameters:
n- the number ofUpdateResponseelements requested which must be less than or equal toavailable()- Returns:
- an array of
UpdateResponseelements. The length of the array is less than or equal to the number specified. - Throws:
IllegalStateException- no more elements available in this listOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-