@FunctionalInterface public interface LongConsumer
long-valued参数并返回任何结果。这是
Consumer为
long原始型专业化。与大多数其他功能接口,
LongConsumer有望通过的副作用。
这是一个functional interface其功能的方法是accept(long)。
Consumer
| Modifier and Type | Method and Description |
|---|---|
void |
accept(long value)
在给定的参数上执行此操作。
|
default LongConsumer |
andThen(LongConsumer after)
返回一个由
LongConsumer执行此操作,在序列,其次是
after操作。
|
void accept(long value)
value -输入参数
default LongConsumer andThen(LongConsumer after)
LongConsumer执行此操作,在序列,其次是
after操作。如果执行任何一个操作抛出一个异常,则将它传递给所组成的操作的调用方。如果执行此操作抛出异常,该
after操作不会被执行。
after -操作执行该操作后
LongConsumer,顺序执行此操作后的
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.