public interface IntConsumer
| java.util.function.IntConsumer |
| |
表示接受单个int参数int返回结果的操作。 这是针对int的Consumer的原始类型专业化。 与大多数其他功能界面不同, IntConsumer预计将通过副作用进行操作。
这是一个 functional interface,其功能方法是 accept(int) 。
也可以看看:
公共方法(Public methods) |
|
|---|---|
abstract void |
accept(int value) 对给定的参数执行此操作。 |
default IntConsumer |
andThen(IntConsumer after) 返回合成的 |
void accept (int value)
对给定的参数执行此操作。
| 参数(Parameters) | |
|---|---|
value |
int: the input argument |
IntConsumer andThen (IntConsumer after)
返回合成的IntConsumer ,按顺序执行此操作,然后执行after操作。 如果执行任一操作会引发异常,则将其传递给组合操作的调用者。 如果执行此操作会引发异常,则after操作将不会执行。
| 参数(Parameters) | |
|---|---|
after |
IntConsumer: the operation to perform after this operation |
| 返回(Returns) | |
|---|---|
IntConsumer |
a composed IntConsumer that performs in sequence this operation followed by the after operation |
| 抛出异常(Throws) | |
|---|---|
NullPointerException |
if after is null |