T
- Element typepublic final class Repeated<T> extends Object implements Iterator<T>
If you need to repeat endlessly, use Endless
.
Constructor and Description |
---|
Repeated(int max,
Scalar<T> scalar)
Ctor.
|
Repeated(int max,
T element)
Ctor.
|
Repeated(int max,
UncheckedScalar<T> scalar)
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 Repeated(int max, T element)
max
- How many times to repeatelement
- Element to repeatpublic Repeated(int max, Scalar<T> scalar)
max
- How many times to repeatscalar
- Scalar to repeatpublic Repeated(int max, UncheckedScalar<T> scalar)
max
- How many times to repeatscalar
- Scalar to repeatCopyright © 2017 Cactoos. All rights reserved.