RegistryPointer

class RegistryPointer(val registry: Identifier, pointer: Identifier)(source)

A pointer to a value in certain registry

Parameters

registry

registry this pointer's element belongs to

pointer

ID of the element

Constructors

Link copied to clipboard
constructor(registry: Identifier, pointer: Identifier)

Functions

Link copied to clipboard
operator fun component1(): Identifier

Gets the ID of the registry

Link copied to clipboard
operator fun component2(): Identifier

Gets the ID of the pointer

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun <T : Any> get(): T?

Reads a value from this pointer

Link copied to clipboard
operator fun <T : Any> getValue(self: Any?, prop: KProperty<*>): T?
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun <T : Any> set(v: T?): Boolean

Writes a value to this pointer.

Link copied to clipboard
operator fun <T : Any> setValue(self: Any?, prop: KProperty<*>, value: T?)
Link copied to clipboard
open override fun toString(): String

Converts this pointer to the string representation in format of registry@pointer

Link copied to clipboard
fun <T : Any> tryGet(): T?

Attempts to read value from this pointer

Link copied to clipboard

Attempts to set value inside this pointer.

Properties

Link copied to clipboard

ID of the element

Link copied to clipboard

registry this pointer's element belongs to