kactoos-jvm / nnl.rocks.kactoos.func / CallableOf / <init>
CallableOf(runnable:
Runnable
, input:
X
, result:
T
)
runnable
- Encapsulated runnable
Since 0.12
CallableOf(proc:
Proc
<
X
>, input:
X
, result:
T
)
proc
- Encapsulated proc
Since 0.12
CallableOf(func:
Func
<
X
,
T
>, input:
X
)
Func as Callable.
You may want to use this decorator where Callable is required, but you just have a function:
Callable<String> callable = new CallableOf<>(i -> "Hello, world!");
There is no thread-safety guarantee.
func
- Encapsulated func
input
- Input
X
- Type of input
T
- Type of output
Since 0.12