Package overit.geocall.util
Class LazyClosure<T extends Serializable>
java.lang.Object
overit.geocall.util.LazyClosure<T>
- All Implemented Interfaces:
Serializable
LazyClosure is a simple in-memory caching class. The LazyClosure class suits the
caching of database calls, complex object graph building routines and web
service calls that should be cached for performance. It defers from
Lazy
by the default value, in case the Lazy supplier is null.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLazyClosure(Lazy.SerializableSupplier<T> supplier, T def) Creates a LazyClosure object with the definedLazy. -
Method Summary
-
Field Details
-
lazy
-
def
-
-
Constructor Details
-
Method Details
-
get
Returns the value retrieved from the lazy supplier. If the value retrieved from the lazy supplier is null, returns the default value.- Returns:
- The value retrieved from the lazy supplier. If the value retrieved from the lazy supplier is null, returns the default value.
-