Value

class Value(uLongValue: ULong) : OptionalSnowflake(source)

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

Parameters

uLongValue

the raw value this optional wraps. See Snowflake.value and Snowflake.validValues for more details.

Constructors

Link copied to clipboard
constructor(value: Snowflake)
constructor(uLongValue: ULong)

Properties

Link copied to clipboard
Link copied to clipboard
open override val value: Snowflake
Link copied to clipboard

returns null if this is null or OptionalSnowflake.Missing, calls OptionalSnowflake.Value.value otherwise.

Functions

Link copied to clipboard
operator fun component1(): Snowflake

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
inline fun <T : Any> OptionalSnowflake.map(mapper: (Snowflake) -> T): Optional<T>
Link copied to clipboard
fun orElse(default: Snowflake): Snowflake

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

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