Package de.intarsys.tools.collection
Class IntervalIterator
java.lang.Object
de.intarsys.tools.collection.IntervalIterator
- All Implemented Interfaces:
Iterator
Implement an Iterator over a virtual collection of numbers defined by an
interval.
The iterator returns every number with (from invalid input: '>'.= number) and (number invalid input: '<'.=
to) starting with from
. The current number is incremented by
step
after every element access.
-
Constructor Details
-
IntervalIterator
IntervalIterator constructor .- Parameters:
from
- The first number to be returned by the iterator.to
- The number defining an upper limit to the numbers in the collection.
-
-
Method Details