| 程序包 | 说明 |
|---|---|
| com.github.jarvisframework.tool.core.lang |
| 限定符和类型 | 字段和说明 |
|---|---|
private static Optional<?> |
Optional.EMPTY
Common instance for
empty(). |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> Optional<T> |
Optional.empty()
Returns an empty
Optional instance. |
Optional<T> |
Optional.filter(java.util.function.Predicate<? super T> predicate)
If a value is present, and the value matches the given predicate,
return an
Optional describing the value, otherwise return an
empty Optional. |
<U> Optional<U> |
Optional.flatMap(java.util.function.Function<? super T,Optional<U>> mapper)
If a value is present, apply the provided
Optional-bearing
mapping function to it, return that result, otherwise return an empty
Optional. |
<U> Optional<U> |
Optional.map(java.util.function.Function<? super T,? extends U> mapper)
If a value is present, apply the provided mapping function to it,
and if the result is non-null, return an
Optional describing the
result. |
static <T> Optional<T> |
Optional.of(T value)
Returns an
Optional with the specified present non-null value. |
static <T> Optional<T> |
Optional.ofNullable(T value)
Returns an
Optional describing the specified value, if non-null,
otherwise returns an empty Optional. |
| 限定符和类型 | 方法和说明 |
|---|---|
<U> Optional<U> |
Optional.flatMap(java.util.function.Function<? super T,Optional<U>> mapper)
If a value is present, apply the provided
Optional-bearing
mapping function to it, return that result, otherwise return an empty
Optional. |
Copyright © 2020. All rights reserved.