Class Lazy<T>
java.lang.Object
net.neoforged.neoforge.common.util.Lazy<T>
- Type Parameters:
 T- The type of the value
- All Implemented Interfaces:
 Supplier<T>
Proxy object for a value that is calculated on first access, and can be refreshed as well.
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
 
- 
Field Details
- 
delegate
 - 
cachedValue
 
 - 
 - 
Constructor Details
- 
Lazy
 
 - 
 - 
Method Details
- 
of
Constructs a lazy-initialized object.- Parameters:
 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
 
 -