ExistingWeakReference

class ExistingWeakReference<T : Any>(referent: T) : WeakReference<T> (source)

Weak reference that throws IllegalStateException if referent objects not exists.

Parameters

referent

object the new weak reference will refer to

Constructors

Link copied to clipboard
constructor(referent: T)

Creates a new weak reference that refers to the given object. The new reference is not registered with any queue.

Functions

Link copied to clipboard
open override fun get(): T

Throws IllegalStateException if reference object has been cleared.

Inherited functions

Link copied to clipboard
open fun clear()
Link copied to clipboard
open fun enqueue(): Boolean
Link copied to clipboard
open fun isEnqueued(): Boolean
Link copied to clipboard
fun refersTo(p0: T): Boolean