Companion

Functions

Link copied to clipboard
operator fun <T : Any> invoke(): Optional.Missing<T>

Returns a Missing optional of type T.

operator fun <T : Any> invoke(value: T): Optional.Value<T>

Returns a Value optional of type T with the given value.

@JvmName(name = "invokeNullable")
operator fun <T : Any> invoke(value: T?): Optional<T?>

Returns an Optional that is either value on a non-null value, or Null on null.

Link copied to clipboard
fun <T, C : Collection<T>> missingOnEmpty(value: C): Optional<C>