org.omnaest.utils.structure.element.cached
Class WeakCachedElement<T>
java.lang.Object
org.omnaest.utils.structure.element.cached.CachedElement<T>
org.omnaest.utils.structure.element.cached.WeakCachedElement<T>
- Type Parameters:
T -
public class WeakCachedElement<T>
- extends CachedElement<T>
This is a CachedElement which uses a WeakReference to cache a value. If the WeakReference becomes
invalid the element is resolved again.
- Author:
- Omnaest
- See Also:
ValueResolver,
CachedElement
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WeakCachedElement
public WeakCachedElement(CachedElement.ValueResolver<T> valueResolver)
- Parameters:
valueResolver - - See Also:
WeakCachedElement
newCachedValue
protected CachedElement.CachedValue<T> newCachedValue()
- Description copied from class:
CachedElement
- Creates a new
CachedElement.CachedValue instance. Override this to alternate the behavior of the CachedElement
- Overrides:
newCachedValue in class CachedElement<T>
- Returns:
Copyright © 2013. All Rights Reserved.