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>

public final class Memoized<T> extends Object implements 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.