Kactoos

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

Repeated

class Repeated<X : Any, Y : Any> : Func<X, Y>

Func that repeats its calculation a few times before returning the last result. If times is equal or less than zero Repeated.apply will return an exception.

Parameters

func - Func original

times - How many times.

X - Type of input

Y - Type of output

Since 0.4

Constructors

Name Summary
<init> Repeated(proc: Proc<X>, result: Y, max: Int)Repeated(func: Func<X, Y>, times: Int)
Func that repeats its calculation a few times before returning the last result. If times is equal or less than zero Repeated.apply will return an exception.

Functions

Name Summary
apply fun apply(input: X): Y
Apply it.