Package | Description |
---|---|
com.landawn.abacus.util |
Modifier and Type | Class and Description |
---|---|
class |
Nullable<T>
Note: It's copied from OpenJDK at: http://hg.openjdk.java.net/jdk8u/hs-dev/jdk
A container object which may or may not contain a nullable value. |
Modifier and Type | Method and Description |
---|---|
static <T> Any<T> |
Any.empty()
Returns an empty
Any instance. |
abstract <E extends java.lang.Exception> |
Any.filter(Try.Predicate<? super T,E> predicate)
If a value is present, and the value matches the given predicate,
return an
Any describing the value, otherwise return an
empty Any . |
abstract <E extends java.lang.Exception> |
Any.filterIfNotNull(Try.Predicate<? super T,E> predicate)
If a value is not null, and the value matches the given predicate,
return an
Any describing the value, otherwise return an
empty Any . |
abstract <U,E extends java.lang.Exception> |
Any.flatMap(Try.Function<? super T,? extends Any<U>,E> mapper)
If a value is present, apply the provided
Any -bearing
mapping function to it, return that result, otherwise return an empty
Any . |
abstract <U,E extends java.lang.Exception> |
Any.flatMapIfNotNull(Try.Function<? super T,? extends Any<U>,E> mapper)
If a value is not null, apply the provided
Any -bearing
mapping function to it, return that result, otherwise return an empty
Any . |
abstract <U,E extends java.lang.Exception> |
Any.map(Try.Function<? super T,? extends U,E> mapper)
If a value is present, apply the provided mapping function to it,
|
abstract <U,E extends java.lang.Exception> |
Any.mapIfNotNull(Try.Function<? super T,? extends U,E> mapper)
If a value is not null, apply the provided mapping function to it,
|
static <T> Any<T> |
Any.of(T value)
Returns an
Any with the specified present nullable value. |
abstract <E extends java.lang.Exception> |
Any.or(Try.Supplier<? extends Any<T>,E> supplier)
If a value is present, returns an Optional describing the value, otherwise returns an Optional produced by the supplying function.
|
Modifier and Type | Method and Description |
---|---|
abstract <U,E extends java.lang.Exception> |
Any.flatMap(Try.Function<? super T,? extends Any<U>,E> mapper)
If a value is present, apply the provided
Any -bearing
mapping function to it, return that result, otherwise return an empty
Any . |
<U,E extends java.lang.Exception> |
Nullable.flatMap(Try.Function<? super T,? extends Any<U>,E> mapper)
If a value is present, apply the provided
Nullable -bearing
mapping function to it, return that result, otherwise return an empty
Nullable . |
abstract <U,E extends java.lang.Exception> |
Any.flatMapIfNotNull(Try.Function<? super T,? extends Any<U>,E> mapper)
If a value is not null, apply the provided
Any -bearing
mapping function to it, return that result, otherwise return an empty
Any . |
<U,E extends java.lang.Exception> |
Nullable.flatMapIfNotNull(Try.Function<? super T,? extends Any<U>,E> mapper)
If a value is not null, apply the provided
Nullable -bearing
mapping function to it, return that result, otherwise return an empty
Nullable . |
abstract <E extends java.lang.Exception> |
Any.or(Try.Supplier<? extends Any<T>,E> supplier)
If a value is present, returns an Optional describing the value, otherwise returns an Optional produced by the supplying function.
|
<E extends java.lang.Exception> |
Nullable.or(Try.Supplier<? extends Any<T>,E> supplier)
Returns
this if it's present or call supplier.get() . |