public class IlvTimeIterator extends Object implements Iterator<Date>
IlvTimeIterator
traverses over time increments that are defined
by an IlvTimeIncrementPolicy
. The first time returned by the iterator will
be the time increment ceiling of the iterator's start time. In other words, the first
time value will be the smallest time increment boundary that is greater than or equal
to the iterator's start time. Time iterators can have an upper bound or they can be
open-ended. In this case, the hasNext()
method will always return true
.Constructor and Description |
---|
IlvTimeIterator(IlvTimeIncrementPolicy timeIncrementPolicy,
Calendar start)
Creates an open-ended iterator that traverses over time increments.
|
IlvTimeIterator(IlvTimeIncrementPolicy timeIncrementPolicy,
Calendar start,
Calendar end)
Creates a new iterator that traverses over time increments.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns whether the iteration has more elements.
|
Date |
next()
Returns the next
Date in the iteration. |
void |
remove()
Removes from the underlying collection the last time returned by the iterator.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public IlvTimeIterator(IlvTimeIncrementPolicy timeIncrementPolicy, Calendar start, Calendar end)
timeIncrementPolicy
- The time increment policy of the iterator.start
- The start time of the iterator. The first time returned by the
next()
method will be the time increment ceiling of start
. In
other words, the first time value of the iterator will be the smallest time increment
boundary that is greater than or equal to start
.end
- The end time of the iterator, or null
if the iterator is
open-ended.public IlvTimeIterator(IlvTimeIncrementPolicy timeIncrementPolicy, Calendar start)
timeIncrementPolicy
- The time increment policy of the iterator.start
- The start time of the iterator. The first time returned by the
next()
method will be the time increment ceiling of start
. In
other words, the first time value of the iterator will be the smallest time increment
boundary that is greater than or equal to start
.public boolean hasNext()
public Date next()
Date
in the iteration.next
in interface Iterator<Date>
Date
in the iteration.NoSuchElementException
- if the iteration has no more elements.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.