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