OptionalVariable.Undefined

object OptionalVariable.Undefined : OptionalVariable


An implementation of OptionalVariable representing an "undefined" value.

This value will be excluded entirely from the serial form.

Summary

Public functions

open String

Returns a string representation of this object, useful for debugging.

open Nothing?

Unconditionally returns null.

open Nothing

Unconditionally throws an exception.

Public functions

toString

open fun toString(): String

Returns a string representation of this object, useful for debugging.

The string representation is not guaranteed to be stable and may change without notice at any time. Therefore, the only recommended usage of the returned string is debugging and/or logging. Namely, parsing the returned string or storing the returned string in non-volatile storage should generally be avoided in order to be robust in case that the string representation changes.

Returns
String

a string representation of this object.

valueOrNull

open fun valueOrNull(): Nothing?

Unconditionally returns null.

valueOrThrow

open fun valueOrThrow(): Nothing

Unconditionally throws an exception.