@FunctionalInterface public interface PresentOrElseHandler<T>
| 限定符和类型 | 方法和说明 |
|---|---|
void |
presentOrElseHandle(java.util.function.Consumer<? super T> action,
Runnable emptyAction)
值不为空时执行消费操作
值为空时执行其他的操作
|
void presentOrElseHandle(java.util.function.Consumer<? super T> action, Runnable emptyAction)
action - 值不为空时,执行的消费操作emptyAction - 值为空时,执行的操作Copyright © 2024. All rights reserved.