Class Values.LazyValueImpl<T>

java.lang.Object
org.glassfish.jersey.internal.util.collection.Values.LazyValueImpl<T>
All Implemented Interfaces:
LazyValue<T>, Value<T>
Enclosing class:
Values

private static class Values.LazyValueImpl<T> extends Object implements LazyValue<T>
  • Field Details

    • lock

      private final Object lock
    • delegate

      private final Value<T> delegate
    • value

      private volatile Value<T> value
  • Constructor Details

    • LazyValueImpl

      public LazyValueImpl(Value<T> delegate)
  • Method Details

    • get

      public T get()
      Description copied from interface: Value
      Get the stored value.
      Specified by:
      get in interface Value<T>
      Returns:
      stored value.
    • isInitialized

      public boolean isInitialized()
      Description copied from interface: LazyValue
      Check if the lazy value has been initialized already (i.e. its Value.get() method has already been called previously) or not.
      Specified by:
      isInitialized in interface LazyValue<T>
      Returns:
      true if the lazy value has already been initialized, false otherwise.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object