scala.ref

PhantomReference

class PhantomReference[+T <: AnyRef] extends ReferenceWrapper[T]

Inherits

  1. ReferenceWrapper
  2. Proxy
  3. Reference
  4. Function0
  5. AnyRef
  6. Any

Value Members

  1. def apply(): T

    return the underlying value

  2. def clear(): Unit

  3. def enqueue(): Boolean

  4. def equals(that: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence

  5. def get: Option[T]

    return Some underlying if it hasn't been collected, otherwise None

  6. def hashCode(): Int

    Returns a hash code value for the object

  7. def isEnqueued(): Boolean

  8. def self: java.lang.ref.Reference[_ <: T]

  9. def toString(): String

    Returns a string representation of the object

  10. val underlying: java.lang.ref.PhantomReference[_ <: T]

Instance constructors

  1. new PhantomReference(value: T, queue: ReferenceQueue[T])

  2. new PhantomReference()