Ref

abstract class Ref<T>

A reference to an object that may change.

This is the base class used to access a backend object with an associated observer notified each time this associated object changes. Associated object may be null it the corresponding backend object doesn't exists yet or has been removed. Observer is notified when the backend object is created or removed, and when the ref is created if the backend object exists.

Types

Observer
Link copied to clipboard
interface Observer<T>
Observer notified when the referenced changes.

Functions

close
Link copied to clipboard
abstract fun close()
Closes the ref.
get
Link copied to clipboard
abstract fun get(): T
Gets the referenced object.