Class LazyValue<T>

java.lang.Object
org.moddingx.launcherlib.util.LazyValue<T>

public final class LazyValue<T> extends Object
A lazy value that is initialised when first needed.
  • Constructor Details

    • LazyValue

      public LazyValue(Supplier<? extends T> supplier)
      Creates a new lazy value.
  • Method Details

    • get

      public T get()
      Gets the value, computing it on first access.