|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.chronicj.RangeIterator
Simple Iteratorimplmentation that can be used to
traverse the sub ranges that occur between the start and end
TimePointsof a given
DateRange.
Iteration proceeds using the following semantics:
hasNext()returns true if the DateRange returned
by calling next()is included by the current range.next()returns a new DateRange instance created
by using a start date of current start date +1 and an end
date of current start date +2.NOTE: increment will
reflect the DatePrecisionof the
underlying TimePoint s with which the current range was
created.remove()is not supported.
DateRange,
TimePoint,
Iterator,
Range| Constructor Summary | |
RangeIterator(org.chronicj.DateRange aDateRange)
|
|
| Method Summary | |
boolean |
hasNext()
Returns: currentRange.includes(nextRangeIndex)); |
java.lang.Object |
next()
Returns: new DateRange(currentRangeIndex.start().increment(1), currentRangeIndex.start().increment(2)); |
void |
remove()
Currently, throws an UnsupportedOperationException as
this method is not supported. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RangeIterator(org.chronicj.DateRange aDateRange)
| Method Detail |
public boolean hasNext()
currentRange.includes(nextRangeIndex));
hasNext in interface java.util.IteratorIterator.hasNext()public java.lang.Object next()
new DateRange(currentRangeIndex.start().increment(1), currentRangeIndex.start().increment(2));
next in interface java.util.IteratorIterator.next()public void remove()
UnsupportedOperationException as
this method is not supported.
remove in interface java.util.IteratorIterator.remove()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||