Value provider factory & utility methods.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static < value type. T> Value | Returns: eagerly initialized, constant value provider.value provider delegate that will be used to eagerly initialize the value provider. delegate)Get a new eagerly initialized |
| public static < value type. T> Value | Returns: empty value provider.Get an empty |
| public static < value type. T> LazyValue | Returns: lazily initialized value provider.value provider delegate that will be used to lazily initialize the value provider. delegate)Get a new lazily initialized |
| public static < value type. T> Value | Returns: constant value provider.value instance to be provided. value)
Get a new constant |
| EMPTY | back to summary |
|---|---|
| private static final LazyValue<T> EMPTY | |
| Values | back to summary |
|---|---|
| private Values() | |
| eager | back to summary |
|---|---|
| public static <T> Value Get a new eagerly initialized
The value returned by its
The implementation of the returned eager value provider is thread-safe and is guaranteed to
invoke the
If the supplied value provider is | |
| empty | back to summary |
|---|---|
| public static <T> Value Get an empty
| |
| lazy | back to summary |
|---|---|
| public static <T> LazyValue Get a new lazily initialized
The value returned by its
The implementation of the returned lazy value provider is thread-safe and is guaranteed to
invoke the
If the supplied value provider is | |
| of | back to summary |
|---|---|
| public static <T> Value
Get a new constant
In case the supplied value constant is
| |
| Modifier and Type | Field and Description |
|---|---|
| private final T |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public T |
| result | back to summary |
|---|---|
| private final T result | |
| EagerValue | back to summary |
|---|---|
| private EagerValue(final Value<T> value) | |
| get | back to summary |
|---|---|
| public T get() Implements org. Doc from org. Get the stored value.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final T |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(final Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public T | |
| public int | |
| public String |
| value | back to summary |
|---|---|
| private final T value | |
| InstanceValue | back to summary |
|---|---|
| public InstanceValue(final T value) | |
| equals | back to summary |
|---|---|
| public boolean equals(final Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| get | back to summary |
|---|---|
| public T get() Implements org. Doc from org. Get the stored value.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| private final Value | |
| private final Object | |
| private volatile Value |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(final Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public T | |
| public int | |
| public boolean | isInitialized()
Implements org. Check if the lazy value has been initialized already (i.e. its |
| public String |
| delegate | back to summary |
|---|---|
| private final Value<T> delegate | |
| lock | back to summary |
|---|---|
| private final Object lock | |
| value | back to summary |
|---|---|
| private volatile Value<T> value | |
| LazyValueImpl | back to summary |
|---|---|
| public LazyValueImpl(final Value<T> delegate) | |
| equals | back to summary |
|---|---|
| public boolean equals(final Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| get | back to summary |
|---|---|
| public T get() Implements org. Doc from org. Get the stored value.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isInitialized | back to summary |
|---|---|
| public boolean isInitialized() Implements org. Doc from org. Check if the lazy value has been initialized already (i.e. its
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |