Package org.moddingx.libx.util.lazy
Class LazyValue<T>
java.lang.Object
org.moddingx.libx.util.lazy.LazyValue<T>
A lazy value that is resolved when it is first used.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LazyValue
Creates a new lazy value. the supplier will be called once when the value is first retrieved.
-
-
Method Details
-
wrap
Wraps aLazyLoadedValue
to a lazy value. -
get
Gets the value. If not yet resolved, resolves the lazy value. -
map
Gets a new lazy value that will hold the value of this lazy value applied to the mapper function. The mapper function will also get called lazy.
-