Kactoos

kactoos-jvm / nnl.rocks.kactoos.iterator / Repeated

Repeated

class Repeated<out T : Any> : Iterator<T>

Repeat an element.

If you need to repeat endlessly, use Endless.

Parameters

T - Element type

repeat - How many times to repeat

element - Element to repeat

Since 0.3

Constructors

Name Summary
<init> Repeated(max: Int, element: T)Repeated(repeat: Int, element: KScalar<T>)
Repeat an element.

Functions

Name Summary
hasNext fun hasNext(): Boolean
next fun next(): T