class Optional<T> : Serializable


Redefinition of Guava's Optional, created to avoid compatibilty breakages for users of EspressoOptional.

Summary

Public functions

(Mutable)Set<T!>!
Boolean
equals(object: Any!)
java-static Optional<T!>!
<T> fromNullable(value: T?)
T!
get()
Int
Boolean
java-static Optional<T!>!
<T> of(value: T!)
Optional<T!>!
or(other: Optional<T!>!)
T!
or(other: T!)
T!
or(supplier: Supplier<T!>!)
T!
java-static (Mutable)Iterable<T!>!
<T> presentInstances(optionals: (Mutable)Iterable<Optional<T!>!>!)
Optional<V!>!
<V> transform(function: Function<T!, V!>!)

Public functions

asSet

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

equals

fun equals(object: Any!): Boolean

fromNullable

java-static fun <T> fromNullable(value: T?): Optional<T!>!

get

fun get(): T!

hashCode

fun hashCode(): Int

isPresent

fun isPresent(): Boolean

of

java-static fun <T> of(value: T!): Optional<T!>!

or

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

or

fun or(other: T!): 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!>!

transform

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