Interface BiConsumer<T,U>

Type Parameters:
T - the first input type
U - the second input 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 BiConsumer<T,U>
An operation on two values that answers nothing.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(T t, U u)
    Performs this operation.
    default BiConsumer<T,U>
    andThen(BiConsumer<? super T, ? super U> after)
    This operation followed by after, both given the same values.
  • Method Details

    • accept

      void accept(T t, U u)
      Performs this operation.
      Parameters:
      t - the first input
      u - the second input
    • andThen

      default BiConsumer<T,U> andThen(BiConsumer<? super T, ? super U> after)
      This operation followed by after, both given the same values. If this operation throws, after does not run.
      Parameters:
      after - the operation to run next
      Returns:
      the composed operation