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