| Modifier and Type | Method and Description |
|---|---|
static <T> Nullable<T> |
Nullable.empty()
Returns an empty
Nullable instance. |
Nullable<T> |
Nullable.filter(Predicate<? super T> predicate)
If a value is present and it matches the given
predicate,
return a Nullable containing the value, otherwise return an
empty Nullable. |
<U> Nullable<U> |
Nullable.flatMap(Function<? super T,Nullable<U>> mapper)
If a value is present, apply the
Nullable-bearing function to it,
return that result, otherwise return an empty Nullable. |
<U> Nullable<U> |
Nullable.map(Function<? super T,? extends U> mapper)
If a value is present, apply the provided mapping function to it and
return a
Nullable describing the result. |
static <T> Nullable<T> |
Nullable.of(Optional<T> value)
Returns a
Nullable with the value of the specified
Optional if any or an empty Nullable otherwise. |
static <T> Nullable<T> |
Nullable.of(T value)
Returns a
Nullable with the specified value. |
| Modifier and Type | Method and Description |
|---|---|
<U> Nullable<U> |
Nullable.flatMap(Function<? super T,Nullable<U>> mapper)
If a value is present, apply the
Nullable-bearing function to it,
return that result, otherwise return an empty Nullable. |
| Constructor and Description |
|---|
CachedElementWrapper(E elem,
Supplier<Nullable<E>> nextSupplier,
long limit,
long ordinal,
Runnable disableProc)
Constructs a
CachedElementWrapper instance that wraps the given
element while allowing the generation of the next element up to the
given limit. |
Copyright © 2016. All rights reserved.