Kactoos

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

Endless

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

Iterator that never ends.

If you need to repeat certain amount of time, use Repeated.

If you need endless cycle from iterator, use Cycled.

Parameters

T - Element type.

element - Element to repeat.

Since 0.3

Constructors

Name Summary
<init> Endless(element: T)
Endless(element: Scalar<T>)Endless(element: KScalar<T>)
Iterator that never ends.

Functions

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