Class WeakEntry<T>


  • public class WeakEntry<T>
    extends WeakObject<T>
    A weak entry is a reference with an additional argument that can be inspected the referent is garbage collected. E.g. the action reference queue interprets the argument as a runnable to be executed.
    See Also:
    ActionReferenceQueue
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.Object arg
      Optional command argument.
    • Constructor Summary

      Constructors 
      Constructor Description
      WeakEntry​(T object, java.lang.Object arg)
      Construct a new reference.
      WeakEntry​(T object, java.lang.Object arg, java.lang.ref.ReferenceQueue<? super T> queue)
      Construct a
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getArgument()
      Get the argument.
      • Methods inherited from class java.lang.ref.Reference

        clear, clone, enqueue, get, isEnqueued, reachabilityFence
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • arg

        protected java.lang.Object arg
        Optional command argument.
    • Constructor Detail

      • WeakEntry

        public WeakEntry​(T object,
                         java.lang.Object arg)
        Construct a new reference.
        Parameters:
        object - Object to reference.
        arg - The argument.
      • WeakEntry

        public WeakEntry​(T object,
                         java.lang.Object arg,
                         java.lang.ref.ReferenceQueue<? super T> queue)
        Construct a
        Parameters:
        object - Object to reference.
        arg - The argument.
        queue - Reference queue.
    • Method Detail

      • getArgument

        public java.lang.Object getArgument()
        Get the argument.
        Returns:
        The argument.