Interface CalendarList
- All Superinterfaces:
AutoCloseable, Closeable, OsidList, OsidList
Like all OsidLists , CalendarList provides a means for
accessing Calendar elements sequentially either one at a time or
many at a time. Examples:
while (cl.hasNext()) {
Calendar calendar = cl.getNextCalendar();
}
or
while (cl.hasNext()) {
Calendar[] calendars = cl.getNextCalendars(cl.available());
}
-
Method Summary
Modifier and TypeMethodDescriptionGets the nextCalendarin this list.Calendar[]getNextCalendars(long n) Gets the next set ofCalendarelements in this list which must be less than or equal to the return fromavailable().
-
Method Details
-
getNextCalendar
Gets the nextCalendarin this list.- Returns:
- the next
Calendarin this list. ThehasNext()method should be used to test that a nextCalendaris 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.
-
getNextCalendars
Gets the next set ofCalendarelements in this list which must be less than or equal to the return fromavailable().- Parameters:
n- the number ofCalendarelements requested which must be less than or equal toavailable()- Returns:
- an array of
Calendarelements. 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.
-