Class LazyReference<T>

java.lang.Object
com.sk89q.worldedit.util.concurrency.LazyReference<T>

public class LazyReference<T> extends Object
Thread-safe lazy reference.
  • Method Details

    • from

      public static <T> LazyReference<T> from(Supplier<T> valueComputation)
    • computed

      public static <T> LazyReference<T> computed(T value)
      Pre-computed reference, for setting a lazy reference field with a known value.
      Type Parameters:
      T - the type of the value
      Parameters:
      value - the value of the reference
      Returns:
      the new reference
    • getValue

      public T getValue()