anl.aida.util
Class DateRangeProducer

java.lang.Object
  extended by anl.aida.util.DateRangeProducer

public class DateRangeProducer
extends java.lang.Object

Produces DateRanges over some interval.


Nested Class Summary
private  class DateRangeProducer.RangeIter
           
 
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.
 
Method Summary
 java.util.Date getEnd()
           
 int getRangeLength()
          Gets the individual range length.
 java.util.Date getStart()
           
 int getTotalDays()
           
 java.lang.Iterable<DateRange> ranges()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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 date
totalDays - the total number of days over which to produce ranges
rangeLengthInDays - the individual range length
Method Detail

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()