class EspressoOptional

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

Parameters

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

See also
Optional

Summary

Public functions

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

Public functions

absent

java-static fun  absent(): EspressoOptional!

asSet

fun asSet(): (Mutable)Set!

equals

fun equals(object: Any!): Boolean

fromNullable

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

get

fun get(): T!

hashCode

fun hashCode(): Int

isPresent

fun isPresent(): Boolean

of

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

or

fun or(defaultValue: T!): T!

or

fun or(secondChoice: Optional!): Optional!

or

fun or(supplier: Supplier!): T!

orNull

fun orNull(): T!

presentInstances

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

toString

fun toString(): String!

transform

fun  transform(function: Function!): Optional!