Interface Consumer2<A,B>

Type Parameters:
A - Argument 1.
B - Argument 2.
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 Consumer2<A,B>
Functional interface for consumers of 2-part arguments.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <V> Consumer2<A,B>
    andThen(Consumer2<? super A,? super B> after)
    Returns a composed Consumer that performs, in sequence, this operation followed by the after operation.
    void
    apply(A a, B b)
    Performs this operation on the given arguments.
  • Method Details

    • apply

      void apply(A a, B b)
      Performs this operation on the given arguments.
      Parameters:
      a - Argument 1.
      b - Argument 2.
    • andThen

      default <V> Consumer2<A,B> andThen(Consumer2<? super A,? super B> after)
      Returns a composed Consumer that performs, in sequence, this operation followed by the after operation.
      Type Parameters:
      V - The return type.
      Parameters:
      after - The operation to perform after this operation.
      Returns:
      A composed Consumer that performs in sequence this operation followed by the after operation.