Class LazyUtil.PureLazy<T>

java.lang.Object
org.apache.logging.log4j.util.LazyUtil.PureLazy<T>
All Implemented Interfaces:
Supplier<T>, Lazy<T>
Enclosing class:
LazyUtil

static class LazyUtil.PureLazy<T> extends Object implements Lazy<T>
  • Field Details

    • supplier

      private final Supplier<T> supplier
    • value

      private Object value
  • Constructor Details

    • PureLazy

      public PureLazy(Supplier<T> supplier)
  • Method Details

    • value

      public T value()
      Description copied from interface: Lazy
      Returns the value held by this lazy. This may cause the value to initialize if it hasn't been already.
      Specified by:
      value in interface Lazy<T>
    • isInitialized

      public boolean isInitialized()
      Description copied from interface: Lazy
      Indicates whether this lazy value has been initialized.
      Specified by:
      isInitialized in interface Lazy<T>
    • set

      public void set(T newValue)
      Description copied from interface: Lazy
      Sets this lazy value to the provided value.
      Specified by:
      set in interface Lazy<T>