Class CacheValue.SoftValue<V>
java.lang.Object
com.ibm.icu.impl.CacheValue<V>
com.ibm.icu.impl.CacheValue.SoftValue<V>
- Enclosing class:
CacheValue<V>
-
Nested Class Summary
Nested classes/interfaces inherited from class CacheValue
CacheValue.Strength -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()Returns the value (which can be null), or null if it was held in a Reference and has been cleared.resetIfCleared(V value) Methods inherited from class CacheValue
futureInstancesWillBeStrong, getInstance, isNull, setStrength
-
Field Details
-
ref
-
-
Constructor Details
-
SoftValue
SoftValue(V value)
-
-
Method Details
-
get
Description copied from class:CacheValueReturns the value (which can be null), or null if it was held in a Reference and has been cleared.- Specified by:
getin classCacheValue<V>
-
resetIfCleared
Description copied from class:CacheValueIf the value was held via aReferencewhich has been cleared, then it is replaced with a newReferenceto the new value, and the new value is returned. The old and new values should be the same or equivalent.Otherwise the old value is returned.
- Specified by:
resetIfClearedin classCacheValue<V>- Parameters:
value- Replacement value, for when the currentReferencehas been cleared.- Returns:
- The old or new value.
-