Interface NonNullLazy<T>

Type Parameters:
T - The type of the value
All Superinterfaces:
NonNullSupplier<T>

@Deprecated public interface NonNullLazy<T> extends NonNullSupplier<T>
Deprecated.
Use Lazy
Proxy object for a value that is calculated on first access. Same as Lazy, but with a nonnull contract.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> NonNullLazy<T>
    Deprecated.
    Constructs a thread-safe lazy-initialized object
    static <T> NonNullLazy<T>
    of(NonNullSupplier<T> supplier)
    Deprecated.
    Constructs a lazy-initialized object

    Methods inherited from interface net.neoforged.neoforge.common.util.NonNullSupplier

    get
  • Method Details

    • of

      static <T> NonNullLazy<T> of(NonNullSupplier<T> supplier)
      Deprecated.
      Constructs a lazy-initialized object
      Parameters:
      supplier - The supplier for the value, to be called the first time the value is needed.
    • concurrentOf

      static <T> NonNullLazy<T> concurrentOf(NonNullSupplier<T> supplier)
      Deprecated.
      Constructs a thread-safe lazy-initialized object
      Parameters:
      supplier - The supplier for the value, to be called the first time the value is needed.