java.lang.Object
net.automatalib.common.util.ref.WeakRef<T>
Type Parameters:
T - referent type
All Implemented Interfaces:
Ref<T>

public final class WeakRef<T> extends Object implements Ref<T>
A weak reference wrapper, complying to the Ref interface.
  • Constructor Details

    • WeakRef

      public WeakRef(T referent)
      Constructor.
      Parameters:
      referent - the referent.
  • Method Details

    • get

      public @Nullable 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.