{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
public final class EspressoOptional<T>
This class is a wrapper around com.google.common.base.Optional in order to avoid having public references to Guava API.
This is currently not recommended for use and will be deprecated in the future. New APIS should use Nullable annotation instead.
| Parameters | |
|---|---|
<T> |
the type of instance that can be contained. |
| See also | |
|---|---|
Optional |
|
Public constructors |
|
|---|---|
Public methods |
|
|---|---|
static EspressoOptional<T> |
<T> absent() |
Set<T> |
asSet() |
boolean |
|
static EspressoOptional<T> |
<T> fromNullable(T nullableReference) |
T |
get() |
int |
hashCode() |
boolean |
|
static EspressoOptional<T> |
<T> of(T reference) |
Optional<T> |
|
T |
|
T |
or(T defaultValue) |
T |
orNull() |
static @Beta Iterable<T> |
<T> presentInstances(Iterable<Optional<T>> optionals) |
String |
toString() |
Optional<V> |
|
@Beta
public static Iterable<T> <T> presentInstances(Iterable<Optional<T>> optionals)