T
- Type of inputpublic final class FuncAsCallable<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 FuncAsCallable<>( i -> "Hello, world!" );
There is no thread-safety guarantee.
Constructor and Description |
---|
FuncAsCallable(Func<?,T> fnc)
Ctor.
|
Copyright © 2017 Cactoos. All rights reserved.