Reference

data class Reference<out T : Any>(current: T, next: () -> T?)

A reference gives a data and a function to later check the validity and retrieve that data.

Parameters

current

The value of the reference at the time of reference creation.

next

A function that returns the value of the reference, or null if the reference has become invalid, when later needed.

Constructors

Reference
Link copied to clipboard
common
fun <out T : Any> Reference(current: T, next: () -> T?)
The value of the reference at the time of reference creation.

Properties

current
Link copied to clipboard
common
val current: T
The value of the reference at the time of reference creation.
next
Link copied to clipboard
common
val next: () -> T?
A function that returns the value of the reference, or null if the reference has become invalid, when later needed.