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