public class IterableDateRange
extends java.lang.Object
implements java.lang.Iterable, java.util.Iterator
Constructor and Description |
---|
IterableDateRange(java.util.Collection dates,
boolean shiftDates)
Lists of dates to put into the Iterator.
|
IterableDateRange(java.util.Iterator availCalInfoIterator,
boolean shiftDates)
Lists of dates to put into the Iterator.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
java.util.Iterator |
iterator() |
Range |
next()
the Range
|
void |
remove() |
void |
returnPosition() |
static java.util.List |
toDateList(java.util.Collection dates)
Turns a collection of DateRange items into a Collection of Dates
|
static java.util.List |
toDateRangeList(java.util.Collection dates,
boolean shift) |
static java.util.Set |
toDateRangeSet(java.util.Collection dates,
boolean shift)
Given the list of Dates return an Ordered Set of Date Ranges
|
public IterableDateRange(java.util.Iterator availCalInfoIterator, boolean shiftDates)
dates
- shiftDates
- if true, the first date is skipped to create an offset patternpublic IterableDateRange(java.util.Collection dates, boolean shiftDates)
dates
- shiftDates
- if true, the first date is skipped to create an offset patternpublic java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
public boolean hasNext()
hasNext
in interface java.util.Iterator
public Range next()
next
in interface java.util.Iterator
public void remove()
remove
in interface java.util.Iterator
public static java.util.List toDateRangeList(java.util.Collection dates, boolean shift)
public void returnPosition()
public static java.util.List toDateList(java.util.Collection dates)
dates
- public static java.util.Set toDateRangeSet(java.util.Collection dates, boolean shift)
dates
- shift
-