Package com.cedarsoftware.util
Enum Class MultiKeyMap.CollectionKeyMode
- All Implemented Interfaces:
Serializable
,Comparable<MultiKeyMap.CollectionKeyMode>
,Constable
- Enclosing class:
- MultiKeyMap<V>
Enum to control how Collections and Arrays are handled in get/remove/containsKey operations.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTry collection-as-key lookup first, then fallback to multi-key lookup if not found.Try multi-key lookup first, then fallback to collection-as-key lookup if not found.Default behavior: Collections and Arrays are always unpacked into multi-key lookups. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static MultiKeyMap.CollectionKeyMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MULTI_KEY_ONLY
Default behavior: Collections and Arrays are always unpacked into multi-key lookups. No fallback to treating them as single keys. -
MULTI_KEY_FIRST
Try multi-key lookup first, then fallback to collection-as-key lookup if not found. Prioritizes the traditional multi-key behavior. -
COLLECTION_KEY_FIRST
Try collection-as-key lookup first, then fallback to multi-key lookup if not found. Prioritizes treating Collections/Arrays as single keys.
-
-
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
-