None

object None : Optional<Nothing>

The case of Optional holding no value. Always the same, shared singleton instance.

Properties

Link copied to clipboard

Whether this Optional holds no value, i.e. whether it is None. Always !isPresent.

Link copied to clipboard
open override val isPresent: Boolean

Whether this Optional holds a value, i.e. whether it is a Some.

Link copied to clipboard
open override val value: Nothing?

The contained value, or null if this is None.

Functions

Link copied to clipboard
open override fun filter(predicate: (Nothing) -> Boolean): Optional.None

Returns None, without invoking predicate (there is no value to test).

Link copied to clipboard
open override fun <R> map(function: (Nothing) -> R): Optional.None

Returns None, without invoking function (there is no value to apply it to).

Link copied to clipboard
open override fun toSequence(): Sequence<Nothing>

Returns an empty Sequence.

Link copied to clipboard
open override fun toString(): String