T
- Element typepublic final class RepeatIterator<T> extends Object implements Iterator<T>
If you need to repeat endlessly, use EndlessIterable
.
Constructor and Description |
---|
RepeatIterator(Scalar<T> elm,
int max)
Ctor.
|
RepeatIterator(T elm,
int max)
Ctor.
|
RepeatIterator(UncheckedScalar<T> elm,
int max)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
T |
next() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, remove
public RepeatIterator(T elm, int max)
elm
- Element to repeatmax
- How many times to repeatpublic RepeatIterator(Scalar<T> elm, int max)
elm
- Element to repeatmax
- How many times to repeatpublic RepeatIterator(UncheckedScalar<T> elm, int max)
elm
- Element to repeatmax
- How many times to repeatCopyright © 2017 Cactoos. All rights reserved.