Class LazyProperty<T>
java.lang.Object
dev.prozilla.pine.common.property.VariableProperty<T>
dev.prozilla.pine.common.property.LazyProperty<T>
- Direct Known Subclasses:
SystemProperty
A property that does not have a value until it is used for the first time.
This type of property is optimized, because the value will only be fetched once in most cases. This is especially useful for values that are expensive to fetch.
-
Field Summary
FieldsFields inherited from class dev.prozilla.pine.common.property.VariableProperty
random
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
value
-
-
Constructor Details
-
LazyProperty
public LazyProperty()
-
-
Method Details
-
fetch
-
getValue
Returns the current value, or fetches the value if it isnull
.- Specified by:
getValue
in classVariableProperty<T>
- Returns:
- The value of this property.
-