Class Memoized<T>
java.lang.Object
nl.colorize.util.Memoized<T>
- Type Parameters:
T- The type of value that is returned by the operation.
- All Implemented Interfaces:
Supplier<T>
Wraps a computationally expensive operation, so that the result is only
calculated on the first call, and the cached result is returned for
subsequent calls. Evaluation is lazy, the operation is not actually
performed until
get() is called for the first time.-
Method Summary
-
Method Details
-
get
-
toString
-
compute
-