|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.internal.util.collection.Values
public final class Values
A collection of Value provider factory & utility methods.
| Method Summary | ||
|---|---|---|
static
|
empty()
Get an empty value provider whose get()
method always returns null. |
|
static
|
lazy(Value<T> delegate)
Get a new lazily initialized value provider. |
|
static
|
of(T value)
Get a new constant value provider whose get()
method always returns the instance supplied to the value parameter. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> Value<T> empty()
value provider whose get()
method always returns null.
T - value type.
public static <T> Value<T> of(T value)
value provider whose get()
method always returns the instance supplied to the value parameter.
In case the supplied value constant is null, an empty value
provider is returned.
T - value type.value - value instance to be provided.
public static <T> Value<T> lazy(Value<T> delegate)
value provider.
The value returned by its get() method is lazily retrieved during a first
call to the method from the supplied delegate value provider and is then cached for
a subsequent retrieval.
The implementation of the returned lazy value provider is thread-safe and is guaranteed to
invoke the get() method on the supplied delegate value provider instance at
most once.
If the supplied value provider is null, an empty value
provider is returned.
T - value type.delegate - value provider delegate that will be used to lazily initialize the value provider.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||