Interface TConsumer<T>

Type Parameters:
T - The argument type
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 TConsumer<T>
This is a functional interface that can be used to replace Consumer and throw exceptions.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(T t)
    Accepts the given argument and throws an exception.
    default TConsumer<T>
    andThen(TConsumer<? super T> after)
     
  • Method Details

    • accept

      void accept(T t) throws Throwable
      Accepts the given argument and throws an exception.
      Parameters:
      t - The argument
      Throws:
      Throwable - The exception
    • andThen

      default TConsumer<T> andThen(TConsumer<? super T> after)
      Parameters:
      after - The operation to perform after this operation
      Returns:
      A composed TConsumer that performs in sequence this operation followed by the after