de.jaret.util.date.iterator
Class SecondIterator

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

public class SecondIterator
extends AbstractDateIterator
implements DateIterator

Implementation of the DateIterator for seconds.

Version:
$Id: SecondIterator.java 828 2009-02-08 13:58:21Z kliem $
Author:
kliem

Nested Class Summary
 
Nested classes/interfaces inherited from interface de.jaret.util.date.iterator.DateIterator
DateIterator.Format
 
Field Summary
protected  IIteratorFormatter _defaultFormatter
          default formatter.
protected  int _secondStep
          step for seconds.
protected static NumberFormat NF
          Number format for labels.
 
Fields inherited from class de.jaret.util.date.iterator.AbstractDateIterator
_correctDST, _currentDate, _endDate, _formatter, _lastInDST
 
Constructor Summary
SecondIterator(int secondStep)
          Contructor supplying the setp.
 
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

_defaultFormatter

protected IIteratorFormatter _defaultFormatter
default formatter.


_secondStep

protected int _secondStep
step for seconds.


NF

protected static final NumberFormat NF
Number format for labels.

Constructor Detail

SecondIterator

public SecondIterator(int secondStep)
Contructor supplying the setp.

Parameters:
secondStep - number of seconds between steps
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.