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