Interface ThrowableConsumer<T>

  • Type Parameters:
    T - input parameter type T
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface ThrowableConsumer<T>
    Throwable Consumer
    Since:
    0.1
    Author:
    PARK Yong Seo
    See Also:
    Consumer
    • Method Summary

      Modifier and Type Method Description
      void accept​(T t)  
      static <T> java.util.function.Consumer<T> ignore​(ThrowableConsumer<T> consumer)
      ignore exception
      this method recommend only special situation
      static <T> java.util.function.Consumer<T> runtime​(ThrowableConsumer<T> consumer)
      throws Exception lambda to throws RuntimeException lambda
    • Method Detail

      • accept

        void accept​(T t)
             throws java.lang.Exception
        Parameters:
        t - input parameter type T
        Throws:
        java.lang.Exception
        See Also:
        Consumer
      • runtime

        static <T> java.util.function.Consumer<T> runtime​(ThrowableConsumer<T> consumer)
        throws Exception lambda to throws RuntimeException lambda
        Parameters:
        consumer -
        Returns:
        Since:
        0.6
      • ignore

        static <T> java.util.function.Consumer<T> ignore​(ThrowableConsumer<T> consumer)
        ignore exception
        this method recommend only special situation
        Parameters:
        consumer -
        Returns:
        Since:
        1.1