@FunctionalInterface public interface LongConsumer
long值参数的操作,并且不返回结果。
这是long的Consumer的原始类型long 。
与大多数其他功能界面不同,预计LongConsumer将通过副作用进行操作。
这是一个functional interface的功能方法是accept(long) 。
Consumer
| Modifier and Type | Method and Description |
|---|---|
void |
accept(long value)
对给定的参数执行此操作。
|
default LongConsumer |
andThen(LongConsumer after)
返回一个组合的
LongConsumer ,
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.