X
- Type of inputT
- Type of outputpublic final class CallableOf<X,T> extends Object implements Callable<T>
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.
Constructor and Description |
---|
CallableOf(Func<X,T> fnc)
Ctor.
|
CallableOf(Func<X,T> fnc,
X ipt)
Ctor.
|
CallableOf(Proc<X> proc)
Ctor.
|
CallableOf(Runnable runnable)
Ctor.
|
public CallableOf(Runnable runnable)
runnable
- Encapsulated procCopyright © 2017 Cactoos. All rights reserved.