SetOnceGetValue

open class SetOnceGetValue<T>

Represents a value that can be set once, but can be fetched at any time in the application lifecycle.

Author

Noel (cutie@floofy.dev)

Parameters

<T>

The resolvent type.

Functions

Link copied to clipboard
open fun equals(that: Any): Boolean
Link copied to clipboard
@NotNull
open fun getValue(): T
Returns the value if it was set using the setValue function.
Link copied to clipboard
@Nullable
open fun getValueOrNull(): T
Returns the value if it was ever set using setValue, or null if not.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun setValue(@NotNull value: T)
Sets a reference into this setter.
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
open fun wasSet(): Boolean
Was the value set?