Interface CheckedConsumer<T>

  • Type Parameters:
    T - Functional parameter
    All Superinterfaces:
    Serializable
    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 CheckedConsumer<T>
    extends Serializable
    Version of Consumer that is serializable and checked
    • Method Detail

      • accept

        void accept​(T t)
             throws Throwable
        Accept.
        Parameters:
        t - the t
        Throws:
        Throwable - the throwable
      • asFunction

        default <R> CheckedFunction<T,​R> asFunction​(R returnValue)
        As consumer serializable consumer.
        Returns:
        the serializable consumer
      • asFunction

        default <R> CheckedFunction<T,​R> asFunction()
        As consumer serializable consumer.
        Returns:
        the serializable consumer