Class CallableOf<T>

  • Type Parameters:
    T - Type of output
    All Implemented Interfaces:
    Callable<T>

    public final class CallableOf<T>
    extends CallableEnvelope<T>
    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.

    Since:
    0.12
    • Constructor Detail

      • CallableOf

        public CallableOf​(Scalar<? extends T> slr)
        Ctor.
        Parameters:
        slr - Encapsulated scalar
        Since:
        0.41