Interface ThrowingFunction<T,​R>

  • Type Parameters:
    T - The type of object that the function consumes
    R - The type of object that the function produces
    All Superinterfaces:
    java.util.function.Function<T,​R>

    public interface ThrowingFunction<T,​R>
    extends java.util.function.Function<T,​R>
    Wraps a consumer, so that we can throw exceptions properly when using lambda functions
    • Method Detail

      • throwingFunctionWrapper

        static <T,​R> java.util.function.Function<T,​R> throwingFunctionWrapper​(ThrowingFunction<T,​R> throwingFunction)
      • apply

        default R apply​(T input)
        Specified by:
        apply in interface java.util.function.Function<T,​R>
      • applyThrows

        R applyThrows​(T input)
               throws java.lang.Exception
        Throws:
        java.lang.Exception