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,
T result)
Ctor.
|
CallableOf(Runnable runnable,
T result)
Ctor.
|
Copyright © 2017–2019 Cactoos. All rights reserved.