kactoos-jvm / nnl.rocks.kactoos / Func
interface Func<in X :
Any
, out Y :
Any
>
Function.
Since 0.2
Name | Summary |
---|---|
apply | abstract fun apply(input: X ): Y Apply it. |
Name | Summary |
---|---|
Async | class Async<X : Any , Y : Any > : Func < X , Future < Y >>, Proc < X > Func that runs in the background. |
Chained | class Chained<X : Any , Y : Any , Z : Any > : Func < X , Z > Composed function. |
CheckedFunc | class CheckedFunc<X : Any , Y : Any , E> : Func < X , Y > Func that throws exception of specified type. |
FallbackFrom | class FallbackFrom<T : Any > : Func < Throwable , T > Fallback from exception. |
FuncOf | class FuncOf<in X : Any , out Y : Any > : Func < X , Y > Represents many possible inputs as Func. |
FuncWithFallback | class FuncWithFallback<in X : Any , out Y : Any > : Func < X , Y > Func with a fallback plan. |
IoCheckedFunc | class IoCheckedFunc<in X : Any , out Y : Any > : Func < X , Y > Func that doesn’t throw checked Exception, but throws IOException instead. |
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. |
Retry | class Retry<X : Any , Y : Any > : Func < X , Y > Func that will try a few times before throwing an exception. |
SolidFunc | class SolidFunc<in X : Any , out Y : Any > : Func < X , Y > Func that is thread-safe and sticky. |
StickyFunc | class StickyFunc<in X : Any , out Y : Any > : Func < X , Y > Func that caches previously calculated values and doesn’t recalculate again. |
SyncFunc | class SyncFunc<X : Any , Y : Any > : Func < X , Y > Func that is thread-safe. |
TimedFunc | class TimedFunc<X : Any , Y : Any > : Func < X , Y > Function that gets interrupted after a certain time has passed. |
UncheckedFunc | class UncheckedFunc<in X : Any , out Y : Any > : Func < X , Y > Func that doesn’t throw checked Exception. |