| Package | Description |
|---|---|
| me.lucko.helper.utils |
| Modifier and Type | Method and Description |
|---|---|
static <T> NullableOptional<T> |
NullableOptional.empty()
Returns an empty
NullableOptional instance. |
NullableOptional<T> |
NullableOptional.filter(Predicate<? super T> predicate)
If a value is present, and the value matches the given predicate,
return an
NullableOptional describing the value, otherwise return an
empty NullableOptional. |
<U> NullableOptional<U> |
NullableOptional.flatMap(Function<? super T,NullableOptional<U>> mapper)
If a value is present, apply the provided
NullableOptional-bearing
mapping function to it, return that result, otherwise return an empty
NullableOptional. |
static <T> NullableOptional<T> |
NullableOptional.fromOptional(Optional<T> value)
Returns a
NullableOptional describing the specified optional. |
<U> NullableOptional<U> |
NullableOptional.map(Function<? super T,? extends U> mapper)
If a value is present, apply the provided mapping function to it,
and return an
NullableOptional describing the
result. |
static <T> NullableOptional<T> |
NullableOptional.of(T value)
Returns a
NullableOptional with the specified present value. |
| Modifier and Type | Method and Description |
|---|---|
<U> NullableOptional<U> |
NullableOptional.flatMap(Function<? super T,NullableOptional<U>> mapper)
If a value is present, apply the provided
NullableOptional-bearing
mapping function to it, return that result, otherwise return an empty
NullableOptional. |
Copyright © 2022. All rights reserved.