{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
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 functions |
|
|---|---|
java-static EspressoOptional<T!>! |
<T> absent() |
(Mutable)Set<T!>! |
asSet() |
Boolean |
|
java-static EspressoOptional<T!>! |
<T> fromNullable(nullableReference: T!) |
T! |
get() |
Int |
hashCode() |
Boolean |
|
java-static EspressoOptional<T!>! |
<T> of(reference: T!) |
Optional<T!>! |
|
T! |
|
T! |
or(defaultValue: T!) |
T! |
orNull() |
java-static @Beta (Mutable)Iterable<T!>! |
<T> presentInstances(optionals: (Mutable)Iterable<Optional<T!>!>!) |
String! |
toString() |
Optional<V!>! |
|