Package com.cedarsoftware.util
Enum Class MultiKeyMap.CollectionKeyMode
- All Implemented Interfaces:
Serializable
,Comparable<MultiKeyMap.CollectionKeyMode>
,Constable
- Enclosing class:
- MultiKeyMap<V>
Controls how Collections are treated when used as keys in MultiKeyMap.
Note: Arrays are ALWAYS expanded regardless of this setting, as they cannot override equals/hashCode and would only compare by identity (==).
- Since:
- 3.6.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCollections are automatically unpacked into multi-key entries (default behavior).Collections are treated as single key objects and 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
Collections are automatically unpacked into multi-key entries (default behavior). A List.of("a", "b", "c") becomes a 3-dimensional key equivalent to calling getMultiKey("a", "b", "c"). -
COLLECTIONS_NOT_EXPANDED
Collections are treated as single key objects and not unpacked. A List.of("a", "b", "c") remains as a single Collection key. Use this mode when you want Collections to be compared by their equals() method rather than being expanded into multi-dimensional 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
-