Class LazyUtil.Constant<T>

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

static class LazyUtil.Constant<T> extends Object implements Lazy<T>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final T
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constant(T value)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether this lazy value has been initialized.
    void
    set(T newValue)
    Sets this lazy value to the provided value.
     
    Returns the value held by this lazy.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.logging.log4j.util.Lazy

    get, map
  • Field Details

    • value

      private final T value
  • Constructor Details

    • Constant

      Constant(T value)
  • 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>
    • toString

      public String toString()
      Overrides:
      toString in class Object