Package org.cactoos.scalar
Class CallableOf<T>
- java.lang.Object
-
- org.cactoos.scalar.CallableEnvelope<T>
-
- org.cactoos.scalar.CallableOf<T>
-
- Type Parameters:
T
- Type of output
- All Implemented Interfaces:
Callable<T>
public final class CallableOf<T> extends CallableEnvelope<T>
Func asCallable
.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.
- Since:
- 0.12
-
-
Constructor Summary
Constructors Constructor Description CallableOf(Scalar<? extends T> slr)
Ctor.
-