java.lang.Object
me.sbasalaev.Lazy<T>
- Type Parameters:
T- the type of the value, may be nullable.
- All Implemented Interfaces:
Supplier<T>
Lazily evaluated value.
This class is thread-safe, the evaluation of the value only happens once
and it is safe to call
get() simultaneously from different threads.- Since:
- 1.1
-
Constructor Details
-
Lazy
Creates new instance that lazily evaluates the value from thesupplier. -
Lazy
Creates new instance with thevaluethat is already evaluated.
-
-
Method Details