Package net.automatalib.common.util.ref
Class Refs
- java.lang.Object
-
- net.automatalib.common.util.ref.Refs
-
public final class Refs extends Object
Utility functions for dealing with references.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> StrongRef<T>
strong(T referent)
Creates a strong reference to the given referent.static <T> WeakRef<T>
weak(T referent)
Creates a weak reference to the given referent.
-
-
-
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.
-
-