Module methanol

Interface ThrowingConsumer<T>


  • public interface ThrowingConsumer<T>
    A consumer that permits throwing a checked Exception.
    • Method Detail

      • accept

        void accept​(T t)
             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • toUnchecked

        default java.util.function.Consumer<T> toUnchecked()
        Converts this consumer to a Consumer. If this consumer throws a checked exception, the returned consumer wraps the former in a CompletionException.