java.lang.Object
st.orm.template.impl.LazySupplier<T>
- Type Parameters:
T- the type of results supplied by this supplier.
- All Implemented Interfaces:
Supplier<T>
Returns a lazily initialized value.
-
Constructor Summary
ConstructorsConstructorDescriptionLazySupplier(Supplier<T> supplier) LazySupplier(Supplier<T> supplier, T initialValue) -
Method Summary
-
Constructor Details
-
LazySupplier
-
LazySupplier
-
-
Method Details
-
lazy
Returns a supplier which lazy initializes the value.- Type Parameters:
T- the type of results supplied by this supplier.- Parameters:
supplier- the supplier that provides the value.- Returns:
- a supplier which lazy initializes the value.
-
get
Gets a result. -
value
Returns the value if it has already been lazily loaded, otherwise an empty optional is returned.- Returns:
- the value if it has already been lazily loaded, otherwise an empty optional.
-
remove
public void remove()Removes the lazily loaded value. This will not remove the supplier.
-