Modifier and Type | Method and Description |
---|---|
static <T> Ref<T> |
emptyRef()
Construct a new empty mutable
Ref instance. |
static <T> Ref<T> |
immutableRef(T value)
Construct a new immutable
Ref instance referencing the given
input value. |
static <T> Ref<T> |
of(T value)
Construct a new mutable
Ref instance referencing the given
input value. |
static <T> Ref<T> |
threadSafe()
Construct a new empty mutable thread-safe
Ref instance. |
static <T> Ref<T> |
threadSafe(T value)
Construct a new mutable thread-safe
Ref instance referencing the given
input value. |
public static <T> Ref<T> of(T value)
Ref
instance referencing the given
input value.T
- type of the referenced instance.value
- value of the newly constructed reference.Ref
instance referencing the given
input value.public static <T> Ref<T> emptyRef()
Ref
instance.T
- type of the referenced instance.Ref
instance.public static <T> Ref<T> threadSafe()
Ref
instance.T
- type of the referenced instance.Ref
instance.public static <T> Ref<T> threadSafe(T value)
Ref
instance referencing the given
input value.T
- type of the referenced instance.value
- value of the newly constructed reference.Ref
instance referencing the given
input value.public static <T> Ref<T> immutableRef(T value)
Ref
instance referencing the given
input value.
Invoking a Settable.set(java.lang.Object)
on the returned instance
will result in a IllegalStateException
being thrown.T
- type of the referenced instance.value
- value of the newly constructed reference.Ref
instance referencing the given
input value.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.