OptionalLong.IfPresent(ILongConsumer) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
如果存在值,则使用该值执行给定操作,否则不执行任何操作。
[Android.Runtime.Register("ifPresent", "(Ljava/util/function/LongConsumer;)V", "", ApiSince=24)]
public void IfPresent(Java.Util.Functions.ILongConsumer? action);
[<Android.Runtime.Register("ifPresent", "(Ljava/util/function/LongConsumer;)V", "", ApiSince=24)>]
member this.IfPresent : Java.Util.Functions.ILongConsumer -> unit
参数
- action
- ILongConsumer
要执行的操作(如果存在值)
- 属性
注解
Java文档java.util.OptionalLong.ifPresent(java.util.function.LongConsumer)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。