de.jaret.util.date.iterator
Class DayIterator

java.lang.Object
  extended by de.jaret.util.date.iterator.AbstractDateIterator
      extended by de.jaret.util.date.iterator.DayIterator
All Implemented Interfaces:
DateIterator

public class DayIterator
extends AbstractDateIterator
implements DateIterator

Implementation of the DateIterator for days.

Version:
$Id: DayIterator.java 845 2009-02-22 18:28:44Z kliem $
Author:
kliem

Nested Class Summary
 
Nested classes/interfaces inherited from interface de.jaret.util.date.iterator.DateIterator
DateIterator.Format
 
Field Summary
protected  int _days
          day step.
protected  IIteratorFormatter _defaultFormatter
          default formatter.
 
Fields inherited from class de.jaret.util.date.iterator.AbstractDateIterator
_correctDST, _currentDate, _endDate, _formatter, _lastInDST
 
Constructor Summary
DayIterator()
          Constructs the iterator with a 1 day step.
DayIterator(int days)
          Constructs the iterator with a n day step.
 
Method Summary
protected  void advanceDate(JaretDate date)
          Advance the given date by the amount necessary.
protected  JaretDate correctStartDate(JaretDate date)
          Correct the given date to a clean starting position.
 long getApproxStepMilliSeconds()
          Return the approximate step between dates in milli seconds.
protected  IIteratorFormatter getDefaultFormatter()
          Internal method to retrieve a default formatter.
 
Methods inherited from class de.jaret.util.date.iterator.AbstractDateIterator
getFormatter, getLabel, getNextDate, hasNextDate, previewNextDate, reInitialize, setCorrectDST, setFormatter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.jaret.util.date.iterator.DateIterator
getLabel, getNextDate, hasNextDate, previewNextDate, reInitialize, setCorrectDST, setFormatter
 

Field Detail

_days

protected int _days
day step.


_defaultFormatter

protected IIteratorFormatter _defaultFormatter
default formatter.

Constructor Detail

DayIterator

public DayIterator()
Constructs the iterator with a 1 day step.


DayIterator

public DayIterator(int days)
Constructs the iterator with a n day step.

Parameters:
days - number of days per step
Method Detail

advanceDate

protected void advanceDate(JaretDate date)
Advance the given date by the amount necessary.

Specified by:
advanceDate in class AbstractDateIterator
Parameters:
date - date to be modified

getApproxStepMilliSeconds

public long getApproxStepMilliSeconds()
Return the approximate step between dates in milli seconds.

Specified by:
getApproxStepMilliSeconds in interface DateIterator
Returns:
approximate step between iterated dates in milli seconds

correctStartDate

protected JaretDate correctStartDate(JaretDate date)
Correct the given date to a clean starting position.

Specified by:
correctStartDate in class AbstractDateIterator
Parameters:
date - start date
Returns:
clean starting position

getDefaultFormatter

protected IIteratorFormatter getDefaultFormatter()
Internal method to retrieve a default formatter.

Specified by:
getDefaultFormatter in class AbstractDateIterator
Returns:
the default formatter of the iterator


Copyright © 2013. All Rights Reserved.