Class: Lazy<T>
util.Lazy
A wrapper class to lazily initialize a value. Supports custom factory and predicate methods.
Type parameters#
| Name |
|---|
T |
Constructors#
constructor#
• new Lazy<T>(factory, exists?)
Type parameters#
| Name |
|---|
T |
Parameters#
| Name | Type |
|---|---|
factory | LazyFactory<T> |
exists | ExistsPredicate<T> |
Defined in#
Accessors#
current#
• get current(): T
The current value of the lazy object. Will be initialized, if the 'exists' predicate doesn't match.
Returns#
T