Package me.hsgamer.hscore.common
Class CachedValue<T>
java.lang.Object
me.hsgamer.hscore.common.CachedValue<T>
- Type Parameters:
T- the type of the value
- Direct Known Subclasses:
StickySupplier
The base class for caching value
-
Constructor Details
-
CachedValue
public CachedValue()
-
-
Method Details
-
getValue
Get the cached value or generate one if the cache is null- Returns:
- the value
-
clearCache
public void clearCache()Clear the cached value -
generate
Generate the value- Returns:
- the value
-