Class ImmutableReference<T>

java.lang.Object
org.jgroups.util.ImmutableReference<T>

public class ImmutableReference<T> extends Object
Simple class that holds an immutable reference to another object (or to null).
Author:
Brian Stansberry
  • Constructor Details

    • ImmutableReference

      public ImmutableReference(T referent)
      Create a new ImmutableReference.
      Parameters:
      referent - the object to refer to, or null
  • Method Details

    • get

      public T get()
      Gets the wrapped object, if there is one.
      Returns:
      the object passed to the constructor, or null if null was passed to the constructor