anl.aida.util
Class DateRangeProducer
java.lang.Object
anl.aida.util.DateRangeProducer
public class DateRangeProducer
- extends java.lang.Object
Produces DateRanges over some interval.
Field Summary |
(package private) java.util.Calendar |
cal
|
private java.util.Date |
end
|
private int |
rangeLength
|
private java.util.Date |
start
|
private int |
totalDays
|
Constructor Summary |
DateRangeProducer(java.util.Date start,
int totalDays,
int rangeLengthInDays)
If totalDays is less than timeSliceInDays then no ranges will be returned. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cal
java.util.Calendar cal
rangeLength
private int rangeLength
totalDays
private int totalDays
start
private java.util.Date start
end
private java.util.Date end
DateRangeProducer
public DateRangeProducer(java.util.Date start,
int totalDays,
int rangeLengthInDays)
- If totalDays is less than timeSliceInDays then no ranges will be returned.
- Parameters:
start
- the starting datetotalDays
- the total number of days over which to produce rangesrangeLengthInDays
- the individual range length
ranges
public java.lang.Iterable<DateRange> ranges()
getStart
public java.util.Date getStart()
getEnd
public java.util.Date getEnd()
getRangeLength
public int getRangeLength()
- Gets the individual range length.
- Returns:
getTotalDays
public int getTotalDays()