org.jgroups.util

## Class ImmutableReference<T>

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

    public class ImmutableReference<T>
    extends java.lang.Object

Simple class that holds an immutable reference to another object (or to `null`).

Author:
  Brian Stansberry

### Constructor Summary

Constructors
Constructor and Description
`ImmutableReference(T referent)` Create a new ImmutableReference.

### Method Summary

Methods
`T` `get()` Gets the wrapped object, if there is one.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ImmutableReference

    public ImmutableReference(T referent)

Create a new ImmutableReference.

Parameters:
  `referent` - the object to refer to, or `null`

### Method Detail

#### 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