it.amattioli.encapsulate.dates
Class DayIterator
java.lang.Object
it.amattioli.encapsulate.dates.DayIterator
- All Implemented Interfaces:
- Iterator<Day>
public class DayIterator
- extends Object
- implements Iterator<Day>
Iterates over a day range. A day iterator is built given a start and end
day and allows to iterate over each day in the range.
|
Constructor Summary |
DayIterator(Day start,
Day end)
Construct an iterator given the initial and end day. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DayIterator
public DayIterator(Day start,
Day end)
- Construct an iterator given the initial and end day.
- Parameters:
start - the start day. This will be the first day the next()
method will returnend - the end day. Once the next() method returned this day
the hasNext() method will return false
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<Day>
next
public Day next()
- Specified by:
next in interface Iterator<Day>
remove
public void remove()
- Specified by:
remove in interface Iterator<Day>
Copyright © 2011. All Rights Reserved.