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