private static class Values.LazyUnsafeValueImpl<T,E extends java.lang.Throwable> extends java.lang.Object implements LazyUnsafeValue<T,E>
Modifier and Type | Field and Description |
---|---|
private UnsafeValue<T,E> |
delegate |
private java.lang.Object |
lock |
private UnsafeValue<T,E> |
value |
Constructor and Description |
---|
LazyUnsafeValueImpl(UnsafeValue<T,E> delegate) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
T |
get()
Get the stored value.
|
int |
hashCode() |
boolean |
isInitialized()
Check if the lazy value has been initialized already (i.e.
|
java.lang.String |
toString() |
private final java.lang.Object lock
private final UnsafeValue<T,E extends java.lang.Throwable> delegate
private volatile UnsafeValue<T,E extends java.lang.Throwable> value
public LazyUnsafeValueImpl(UnsafeValue<T,E> delegate)
public T get() throws E extends java.lang.Throwable
UnsafeValue
get
in interface UnsafeValue<T,E extends java.lang.Throwable>
E
- in case there was an error while computing the value.E extends java.lang.Throwable
public boolean isInitialized()
LazyUnsafeValue
UnsafeValue.get()
method
has already been called previously) or not.isInitialized
in interface LazyUnsafeValue<T,E extends java.lang.Throwable>
true
if the lazy value has already been initialized, false
otherwise.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object