Enum Class ReferenceCache.ReferenceType
- All Implemented Interfaces:
Serializable, Comparable<ReferenceCache.ReferenceType>, Constable
- Enclosing class:
ReferenceCache<K,V>
Reference type for cache entries
缓存条目的引用类型
- Since:
- JDK 25, opencode-base-cache V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBoth keys and values use soft references 键和值都使用软引用Only values use soft references, keys are strong 仅值使用软引用,键是强引用Both keys and values use weak references 键和值都使用弱引用Only keys use weak references, values are strong 仅键使用弱引用,值是强引用 -
Method Summary
Modifier and TypeMethodDescriptionstatic ReferenceCache.ReferenceTypeReturns the enum constant of this class with the specified name.static ReferenceCache.ReferenceType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WEAK
Both keys and values use weak references 键和值都使用弱引用 -
SOFT
Both keys and values use soft references 键和值都使用软引用 -
WEAK_KEYS
Only keys use weak references, values are strong 仅键使用弱引用,值是强引用 -
SOFT_VALUES
Only values use soft references, keys are strong 仅值使用软引用,键是强引用
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-