- java.lang.Object
-
- org.refcodes.struct.BoundedIterator<T>
-
- All Implemented Interfaces:
Iterator<T>
public class BoundedIterator<T> extends Object implements Iterator<T>
TheBoundedIterator
decorates anIterator
to limit its element to a maximum number.
-
-
Constructor Summary
Constructors Constructor Description BoundedIterator(Iterator<T> aIterator, int aLengthBounds)
Decorates the givenIterator
with the given length bounds.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
T
next()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-