Kactoos

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

FuncWithFallback

class FuncWithFallback<in X : Any, out Y : Any> : Func<X, Y>

Func with a fallback plan.

There is no thread-safety guarantee.

Parameters

X - Type of input

Y - Type of output

func - The func

fallback - The fallback

follow - The follow up func

Since 0.2

Constructors

Name Summary
<init> FuncWithFallback(func: Func<X, Y>, fallback: Func<Throwable, Y>)FuncWithFallback(func: Func<X, Y>, fallback: Func<Throwable, Y>, follow: Func<Y, Y>)
Func with a fallback plan.

Functions

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