Class CachedSupplier<T>

java.lang.Object
com.hypixel.hytale.function.supplier.CachedSupplier<T>
All Implemented Interfaces:
Supplier<T>

public class CachedSupplier<T> extends Object implements Supplier<T>
  • Field Details

    • delegate

      private final Supplier<T> delegate
    • initialized

      private transient volatile boolean initialized
    • value

      @Nullable private transient T value
  • Constructor Details

    • CachedSupplier

      public CachedSupplier(Supplier<T> delegate)
  • Method Details

    • get

      @Nullable public T get()
      Specified by:
      get in interface Supplier<T>
    • getValue

      @Nullable public T getValue()
    • invalidate

      public void invalidate()