Value

value class Value<A>(val value: A) : ReferenceOr<A> (source)

Constructors

Link copied to clipboard
constructor(value: A)

Properties

Link copied to clipboard
val value: A

Functions

Link copied to clipboard
open fun <B> mapToReference(mappingFunction: (A) -> ReferenceOr<B>): ReferenceOr<B>

Same as map, but for mapping to references.

Link copied to clipboard
open fun <B> mapValue(mappingFunction: (A) -> B): ReferenceOr<B>

Maps the value using the given function.

Link copied to clipboard
Link copied to clipboard
open fun valueOrNull(): A?

Returns the value if this instance is of type Value, or null if it is of type Reference.