Interface ThrowingConsumer<T>

  • Type Parameters:
    T - The type of object that the consumer consumes
    All Superinterfaces:
    java.util.function.Consumer<T>

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

      • throwingConsumerWrapper

        static <T> java.util.function.Consumer<T> throwingConsumerWrapper​(ThrowingConsumer<T> throwingConsumer)
      • accept

        default void accept​(T input)
        Specified by:
        accept in interface java.util.function.Consumer<T>
      • applyThrows

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