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