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