class EspressoOptional<T>


This class is a reimplementation of com.google.common.base.Optional to maintain API compatibility with older versions of espresso.

Parameters
<T>

the type of instance that can be contained. Optional is naturally covariant on this type, so it is safe to cast an Optional<T> to Optional<S> for any supertype S of T.

See also
Optional

Summary

Public functions

java-static EspressoOptional<T!>!
<T> absent()
(Mutable)Set<T!>!
Boolean
equals(object: Any!)
java-static EspressoOptional<T!>!
<T> fromNullable(nullableReference: T!)
T!
get()
Int
Boolean
java-static EspressoOptional<T!>!
<T> of(reference: T!)
T!
or(defaultValue: T!)
Optional<T!>!
or(secondChoice: Optional<T!>!)
T!
or(supplier: Supplier<T!>!)
T!
java-static (Mutable)Iterable<T!>!
<T> presentInstances(optionals: (Mutable)Iterable<Optional<T!>!>!)
String!
Optional<V!>!
<V> transform(function: Function<T!, V!>!)

Public functions

absent

java-static fun <T> absent(): EspressoOptional<T!>!

asSet

fun asSet(): (Mutable)Set<T!>!

equals

fun equals(object: Any!): Boolean

fromNullable

java-static fun <T> fromNullable(nullableReference: T!): EspressoOptional<T!>!

get

fun get(): T!

hashCode

fun hashCode(): Int

isPresent

fun isPresent(): Boolean

of

java-static fun <T> of(reference: T!): EspressoOptional<T!>!

or

fun or(defaultValue: T!): T!

or

fun or(secondChoice: Optional<T!>!): Optional<T!>!

or

fun or(supplier: Supplier<T!>!): T!

orNull

fun orNull(): T!

presentInstances

java-static fun <T> presentInstances(optionals: (Mutable)Iterable<Optional<T!>!>!): (Mutable)Iterable<T!>!

toString

fun toString(): String!

transform

fun <V> transform(function: Function<T!, V!>!): Optional<V!>!