Interface CheckedConsumer<T>

  • All Superinterfaces:
    java.util.function.Consumer<T>

    public interface CheckedConsumer<T>
    extends java.util.function.Consumer<T>
    A consumer interface that automatically wraps any exceptions.
    Author:
    Ramsey Gurley
    • Method Detail

      • accept

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

        void accepts​(T t)
              throws java.lang.Exception
        Same as accept except Exceptions may be thrown.
        Parameters:
        t - the accepted type
        Throws:
        java.lang.Exception - an exception