Class Refs


  • public final class Refs
    extends Object
    Utility functions for dealing with references.
    • Method Detail

      • strong

        public static <T> StrongRef<T> strong​(T referent)
        Creates a strong reference to the given referent.
        Parameters:
        referent - the referent.
        Returns:
        a strong reference to the referent.
      • weak

        public static <T> WeakRef<T> weak​(T referent)
        Creates a weak reference to the given referent.
        Parameters:
        referent - the referent.
        Returns:
        a weak reference to the referent.