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 are handled in get/remove/containsKey operations.
IMPORTANT: Arrays are ALWAYS expanded regardless of this setting because they do not have meaningful equals()/hashCode() implementations and therefore cannot serve as useful keys in a Map's keySet().
This enum only affects Collection objects (List, Set, Queue, etc.) that may have custom equals()/hashCode() implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDefault behavior: Collections are always unpacked into multi-key lookups.Collections are used as single keys (not unpacked). -
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
-
COLLECTIONS_EXPANDED
Default behavior: Collections are always unpacked into multi-key lookups. Arrays are also always unpacked (regardless of this setting). No fallback to treating Collections as single keys. -
COLLECTIONS_NOT_EXPANDED
Collections are used as single keys (not unpacked). Allows Collections with custom equals/hashCode to be used as single keys. Arrays are still always unpacked (regardless of this setting).
-
-
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
-