Interface FragileConsumer<T,​E extends java.lang.Throwable>

  • Type Parameters:
    T - the type of the input to the operation
    E - the type of Throwable which may be thrown

    public interface FragileConsumer<T,​E extends java.lang.Throwable>
    A Consumer which can throw a Throwable
    • Method Detail

      • accept

        void accept​(T t)
             throws E extends java.lang.Throwable
        Performs this operation on the given argument.
        Parameters:
        t - the input argument
        Throws:
        E - if there is some error or exception
        E extends java.lang.Throwable
      • andThen

        default FragileConsumer<T,​E> andThen​(FragileConsumer<? super T,​E> after)
        Returns a composed FragileConsumer that performs, in sequence, this operation followed by the after operation. If performing either operation throws an exception, it is relayed to the caller of the composed operation. If performing this operation throws an exception, the after operation will not be performed.
        Parameters:
        after - the operation to perform after this operation
        Returns:
        a composed FragileConsumer that performs in sequence this operation followed by the after operation
        Throws:
        java.lang.NullPointerException - if after is null
      • wrap

        static <T> java.util.function.Consumer<T> wrap​(FragileConsumer<T,​java.lang.Exception> throwingConsumer)