Value

class Value(val value: Long) : OptionalLong(source)

Represents a field that was assigned a non-null value in the serialized entity. Equality and hashcode is implemented through its value.

Parameters

value

the value this optional wraps.

Constructors

Link copied to clipboard
constructor(value: Long)

Properties

Link copied to clipboard
Link copied to clipboard

returns null if this is null, calls OptionalLong.asNullable otherwise.

Link copied to clipboard
Link copied to clipboard
val value: Long
Link copied to clipboard

returns null if this is null, calls OptionalLong.asNullable otherwise.

Functions

Link copied to clipboard
operator fun component1(): Long

Destructures this optional to its value.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun orElse(default: Long): Long

returns default if the optional is Missing, or Value.value if is Value.

Link copied to clipboard
fun OptionalLong?.orElse(default: Long): Long

returns default if this is null, calls OptionalLong.asNullable otherwise.

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