Class Refs
java.lang.Object
org.glassfish.jersey.internal.util.collection.Refs
A collection of
reference
factory & utility methods.- Author:
- Marek Potociar
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Ref<T>
emptyRef()
Construct a new empty mutableRef
instance.static <T> Ref<T>
immutableRef
(T value) Construct a new immutableRef
instance referencing the given input value.static <T> Ref<T>
of
(T value) Construct a new mutableRef
instance referencing the given input value.static <T> Ref<T>
Construct a new empty mutable thread-safeRef
instance.static <T> Ref<T>
threadSafe
(T value) Construct a new mutable thread-safeRef
instance referencing the given input value.
-
Method Details
-
of
Construct a new mutableRef
instance referencing the given input value.- Type Parameters:
T
- type of the referenced instance.- Parameters:
value
- value of the newly constructed reference.- Returns:
- a new mutable
Ref
instance referencing the given input value.
-
emptyRef
Construct a new empty mutableRef
instance.- Type Parameters:
T
- type of the referenced instance.- Returns:
- a new mutable empty
Ref
instance.
-
threadSafe
Construct a new empty mutable thread-safeRef
instance.- Type Parameters:
T
- type of the referenced instance.- Returns:
- a new mutable empty thread-safe
Ref
instance. - Since:
- 2.8
-
threadSafe
Construct a new mutable thread-safeRef
instance referencing the given input value.- Type Parameters:
T
- type of the referenced instance.- Parameters:
value
- value of the newly constructed reference.- Returns:
- a new mutable thread-safe
Ref
instance referencing the given input value. - Since:
- 2.8
-
immutableRef
Construct a new immutableRef
instance referencing the given input value. Invoking aSettable.set(java.lang.Object)
on the returned instance will result in aIllegalStateException
being thrown.- Type Parameters:
T
- type of the referenced instance.- Parameters:
value
- value of the newly constructed reference.- Returns:
- a new immutable
Ref
instance referencing the given input value.
-