Interface BiConsumerX<T,U>

Type Parameters:
T - 第一个参数类型
U - 第二个参数类型
All Superinterfaces:
BiConsumer<T,U>, 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 BiConsumerX<T,U> extends BiConsumer<T,U>, Serializable
BiConsumerX
Since:
Java 17+
Author:
Kimi Liu
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    accept(T t, U u)
    Performs this operation on the given arguments.
    void
    accepting(T t, U u)
    Performs this operation on the given arguments.
    default BiConsumerX<T,U>
    andThen(BiConsumerX<? super T,? super U> after)
    Returns a composed SerBiCons that performs, in sequence, this operation followed by the after operation.
    static <T, U> BiConsumerX<T,U>
    multi(BiConsumerX<T,U>... consumers)
    multi
    static <T, U> BiConsumerX<T,U>
    什么也不做,用于一些需要传入lambda的方法占位使用

    Methods inherited from interface java.util.function.BiConsumer

    andThen
  • Method Details

    • multi

      @SafeVarargs static <T, U> BiConsumerX<T,U> multi(BiConsumerX<T,U>... consumers)
      multi
      Type Parameters:
      T - type
      U - return type
      Parameters:
      consumers - lambda
      Returns:
      lambda
    • nothing

      static <T, U> BiConsumerX<T,U> nothing()
      什么也不做,用于一些需要传入lambda的方法占位使用
      Type Parameters:
      T - 参数1类型
      U - 参数2类型
      Returns:
      什么也不做
    • accepting

      void accepting(T t, U u) throws Throwable
      Performs this operation on the given arguments.
      Parameters:
      t - the first input argument
      u - the second input argument
      Throws:
      Exception - wrapped checked exception for easy using
      Throwable
    • accept

      default void accept(T t, U u)
      Performs this operation on the given arguments.
      Specified by:
      accept in interface BiConsumer<T,U>
      Parameters:
      t - the first input argument
      u - the second input argument
    • andThen

      default BiConsumerX<T,U> andThen(BiConsumerX<? super T,? super U> after)
      Returns a composed SerBiCons that performs, in sequence, this operation followed by the after operation. If performing either operation throws an exception, it is relayed to the caller of the composed operation. If performing this operation throws an exception, the after operation will not be performed.
      Parameters:
      after - the operation to perform after this operation
      Returns:
      a composed SerBiCons that performs in sequence this operation followed by the after operation
      Throws:
      NullPointerException - if after is null