类 Lazy<T>
java.lang.Object
net.neoforged.neoforge.common.util.Lazy<T>
- 类型参数:
T
- The type of the value
- 所有已实现的接口:
Supplier<T>
Proxy object for a value that is calculated on first access, and can be refreshed as well.
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
-
字段详细资料
-
delegate
-
cachedValue
-
-
构造器详细资料
-
Lazy
-
-
方法详细资料
-
of
Constructs a lazy-initialized object.- 参数:
supplier
- The supplier for the value, to be called the first time the value is needed, or whenever the cache has been invalidated.
-
invalidate
public void invalidate()Invalidates the cache, causing the supplier to be called again on the next access. -
get
-