public final 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 methods

static EspressoOptional
Set
boolean
equals(Object object)
static EspressoOptional
fromNullable(T nullableReference)
T
get()
int
boolean
static EspressoOptional
of(T reference)
T
or(T defaultValue)
Optional
or(Optional secondChoice)
T
or(Supplier supplier)
T
static Iterable
String
Optional
transform(Function function)

Public methods

absent

public static EspressoOptional  absent()

asSet

public Set asSet()

equals

public boolean equals(Object object)

fromNullable

public static EspressoOptional  fromNullable(T nullableReference)

get

public T get()

hashCode

public int hashCode()

isPresent

public boolean isPresent()

of

public static EspressoOptional  of(T reference)

or

public T or(T defaultValue)

or

public Optional or(Optional secondChoice)

or

public T or(Supplier supplier)

orNull

public T orNull()

presentInstances

public static Iterable  presentInstances(Iterable<Optional> optionals)

toString

public String toString()

transform

public Optional  transform(Function function)