Class CheckedFunc<X,​Y,​E extends Exception>

  • Type Parameters:
    X - Type of input
    Y - Type of output
    E - Exception's type
    All Implemented Interfaces:
    Func<X,​Y>

    public final class CheckedFunc<X,​Y,​E extends Exception>
    extends Object
    implements Func<X,​Y>
    Func that throws exception of specified type.
    Since:
    0.32
    • Constructor Detail

      • CheckedFunc

        public CheckedFunc​(Func<X,​Y> original,
                           Func<Exception,​E> fnc)
        Ctor.
        Parameters:
        original - Original func
        fnc - Function that wraps exceptions.
    • Method Detail

      • apply

        public Y apply​(X input)
                throws E extends Exception
        Description copied from interface: Func
        Apply it.
        Specified by:
        apply in interface Func<X,​Y>
        Parameters:
        input - The argument
        Returns:
        The result
        Throws:
        E extends Exception