org.hackystat.utilities.time.interval
Class DayIterator

java.lang.Object
  extended by org.hackystat.utilities.time.interval.DayIterator
All Implemented Interfaces:
java.util.Iterator<Day>

public class DayIterator
extends java.lang.Object
implements java.util.Iterator<Day>

Provides an iterator over Day instances.

Author:
Hongbing Kou, Philip Johnson

Constructor Summary
DayIterator(DayInterval dayInterval)
          Creates a day iterator over the interval.
 
Method Summary
 boolean hasNext()
          Whether it is still inside the day interval.
 Day next()
          Gets the next day.
 void remove()
          Required for iterator().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DayIterator

DayIterator(DayInterval dayInterval)
Creates a day iterator over the interval.

Parameters:
dayInterval - Iterator over the day.
Method Detail

remove

public void remove()
Required for iterator(). It will throw UnSupportedMethodException.

Specified by:
remove in interface java.util.Iterator<Day>

hasNext

public boolean hasNext()
Whether it is still inside the day interval.

Specified by:
hasNext in interface java.util.Iterator<Day>
Returns:
True if it is still in the interval.

next

public Day next()
Gets the next day.

Specified by:
next in interface java.util.Iterator<Day>
Returns:
Next day.