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.
BiConsumerX
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidPerforms this operation on the given arguments.voidPerforms this operation on the given arguments.default BiConsumerX<T, U> andThen(BiConsumerX<? super T, ? super U> after) Returns a composedSerBiConsthat performs, in sequence, this operation followed by theafteroperation.static <T,U> BiConsumerX <T, U> multi(BiConsumerX<T, U>... consumers) multistatic <T,U> BiConsumerX <T, U> nothing()什么也不做,用于一些需要传入lambda的方法占位使用Methods inherited from interface java.util.function.BiConsumer
andThen
-
Method Details
-
multi
multi- Type Parameters:
T- typeU- return type- Parameters:
consumers- lambda- Returns:
- lambda
-
nothing
什么也不做,用于一些需要传入lambda的方法占位使用- Type Parameters:
T- 参数1类型U- 参数2类型- Returns:
- 什么也不做
-
accepting
Performs this operation on the given arguments. -
accept
Performs this operation on the given arguments.- Specified by:
acceptin interfaceBiConsumer<T,U> - Parameters:
t- the first input argumentu- the second input argument
-
andThen
Returns a composedSerBiConsthat performs, in sequence, this operation followed by theafteroperation. If performing either operation throws an exception, it is relayed to the caller of the composed operation. If performing this operation throws an exception, theafteroperation will not be performed.- Parameters:
after- the operation to perform after this operation- Returns:
- a composed
SerBiConsthat performs in sequence this operation followed by theafteroperation - Throws:
NullPointerException- ifafteris null
-