Interface CyclicEventList
- All Superinterfaces:
AutoCloseable, Closeable, OsidList, OsidList
Like all OsidLists , CyclicEventList provides a means
for accessing CyclicEvent elements sequentially either one at a
time or many at a time. Examples:
while (cel.hasNext()) {
CyclicEvent event = cel.getNextCyclicEvent();
}
or
while (cel.hasNext()) {
CyclicEvent[] events = cel.getNextCyclicEvents(cel.available());
}
-
Method Summary
Modifier and TypeMethodDescriptionGets the nextCyclicEventin this list.getNextCyclicEvents(long n) Gets the next set ofCyclicEventelements in this list which must be less than or equal to the number returned fromavailable().
-
Method Details
-
getNextCyclicEvent
Gets the nextCyclicEventin this list.- Returns:
- the next
CyclicEventin this list. ThehasNext()method should be used to test that a nextCyclicEventis 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.
-
getNextCyclicEvents
Gets the next set ofCyclicEventelements in this list which must be less than or equal to the number returned fromavailable().- Parameters:
n- the number ofCyclicEventelements requested which should be less than or equal toavailable()- Returns:
- an array of
CyclicEventelements. 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.
-