T
-操作的第一个参数的类型
U
-运行第二个参数的类型
@FunctionalInterface public interface BiConsumer<T,U>
Consumer
两性专业化。不像大多数其他的功能接口,
BiConsumer
有望通过的副作用。
这是一个functional interface其功能的方法是accept(Object, Object)
。
Consumer
Modifier and Type | Method and Description |
---|---|
void |
accept(T t, U u)
在给定的参数上执行此操作。
|
default BiConsumer<T,U> |
andThen(BiConsumer<? super T,? super U> after)
返回一个由
BiConsumer 执行此操作,在序列,其次是
after 操作。
|
default BiConsumer<T,U> andThen(BiConsumer<? super T,? super U> after)
BiConsumer
执行此操作,在序列,其次是
after
操作。如果执行任何一个操作抛出一个异常,则将它传递给所组成的操作的调用方。如果执行此操作抛出异常,该
after
操作不会被执行。
after
-操作执行该操作后
BiConsumer
,顺序执行此操作后的
after
操作
NullPointerException
-如果
after
是空的
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.