Package-level declarations

Types

Link copied to clipboard

A mutable late init pointer points to a value in memory. It can be used to pass a value by reference. The advantage of a pointer is that it can be used to change the value of a variable in a function.

Link copied to clipboard
interface LateInitPointer<T> : Pointer<T>

A late init pointer points to a value in memory. It can be used to pass a value by reference. The advantage of a pointer is that it can be used to change the value of a variable in a function.

Link copied to clipboard
interface MutablePointer<T> : Pointer<T>

A mutable pointer points to a value in memory. It can be used to pass a value by reference. The advantage of a pointer is that it can be used to change the value of a variable in a function.

Link copied to clipboard

A MutablePointerList refers to a list of mutable pointers.

Link copied to clipboard

A MutablePointingList refers to a list of values that are pointed to by mutable pointers.

Link copied to clipboard
interface Pointer<out T>

A pointer points to a value in memory. It can be used to pass a value by reference. The advantage of a pointer is that it can be used to change the value of a variable in a function.

Link copied to clipboard
typealias PointerList<T> = List<Pointer<T>>

A PointerList refers to a list of pointers.

Link copied to clipboard

A register for pointers.

Link copied to clipboard
interface PointingList<T> : List<T>

A PointingList refers to a list of values that are pointed to by pointers.

Functions

Link copied to clipboard

Create a new mutable pointer which is not initialized yet and can be initialized later

Link copied to clipboard

Create a new pointer which is not initialized yet and can be initialized later

Link copied to clipboard

Create a new mutable pointer pointing to the given value

Link copied to clipboard

Create a mutable list of pointers pointing to the values of the list

Link copied to clipboard
fun <T> Pointer<T?>.notNull(msg: String? = null): Pointer<T>

Make sure that the value of the pointer is not null

Link copied to clipboard
fun <T> T.point(): Pointer<T>

Create a new pointer pointing to the given value

Link copied to clipboard

Create a list of pointers pointing to the values of the list

Link copied to clipboard
fun <T> Pointer<T>.register(register: PointerRegister<T>): Int

Register the pointer to the given register

Link copied to clipboard
fun <T> taskPoint(task: () -> T): Pointer<T>

Create a new pointer which performs the given task on access and returns the result of the task

Link copied to clipboard

Close the pointer (unregister it from all registers)

fun <T> Pointer<T>.unregister(register: PointerRegister<T>)

Unregister the pointer from the given register

Link copied to clipboard

You can create a list that points to the values of a PointerList with this function.

You can create a list that points to the values of a MutablePointerList with this function.