Class Values.LazyUnsafeValueImpl<T,E extends java.lang.Throwable>
- java.lang.Object
-
- org.glassfish.jersey.internal.util.collection.Values.LazyUnsafeValueImpl<T,E>
-
- All Implemented Interfaces:
LazyUnsafeValue<T,E>,UnsafeValue<T,E>
- Enclosing class:
- Values
private static class Values.LazyUnsafeValueImpl<T,E extends java.lang.Throwable> extends java.lang.Object implements LazyUnsafeValue<T,E>
-
-
Field Summary
Fields Modifier and Type Field Description private UnsafeValue<T,E>delegateprivate java.lang.Objectlockprivate UnsafeValue<T,E>value
-
Constructor Summary
Constructors Constructor Description LazyUnsafeValueImpl(UnsafeValue<T,E> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Tget()Get the stored value.inthashCode()booleanisInitialized()Check if the lazy value has been initialized already (i.e.java.lang.StringtoString()
-
-
-
Field Detail
-
lock
private final java.lang.Object lock
-
delegate
private final UnsafeValue<T,E extends java.lang.Throwable> delegate
-
value
private volatile UnsafeValue<T,E extends java.lang.Throwable> value
-
-
Constructor Detail
-
LazyUnsafeValueImpl
public LazyUnsafeValueImpl(UnsafeValue<T,E> delegate)
-
-
Method Detail
-
get
public T get() throws E extends java.lang.Throwable
Description copied from interface:UnsafeValueGet the stored value.
-
isInitialized
public boolean isInitialized()
Description copied from interface:LazyUnsafeValueCheck if the lazy value has been initialized already (i.e. itsUnsafeValue.get()method has already been called previously) or not.- Specified by:
isInitializedin interfaceLazyUnsafeValue<T,E extends java.lang.Throwable>- Returns:
trueif the lazy value has already been initialized,falseotherwise.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-