Class StrongRef<T>

  • Type Parameters:
    T - referent class.
    All Implemented Interfaces:
    Ref<T>

    public final class StrongRef<T>
    extends Object
    implements Ref<T>
    A strong reference wrapper, complying to the Ref interface.
    • Constructor Detail

      • StrongRef

        public StrongRef​(T referent)
        Constructor.
        Parameters:
        referent - the referent.
    • Method Detail

      • get

        public T get()
        Description copied from interface: Ref
        Retrieves the referent. In case of WeakRefs, the return value may become null.
        Specified by:
        get in interface Ref<T>
        Returns:
        the referent.