Enum Class MultiKeyMap.CollectionKeyMode

java.lang.Object
java.lang.Enum<MultiKeyMap.CollectionKeyMode>
com.cedarsoftware.util.MultiKeyMap.CollectionKeyMode
All Implemented Interfaces:
Serializable, Comparable<MultiKeyMap.CollectionKeyMode>, Constable
Enclosing class:
MultiKeyMap<V>

public static enum MultiKeyMap.CollectionKeyMode extends Enum<MultiKeyMap.CollectionKeyMode>
Enum to control how Collections and Arrays are handled in get/remove/containsKey operations.
  • Enum Constant Details

    • MULTI_KEY_ONLY

      public static final MultiKeyMap.CollectionKeyMode 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

      public static final MultiKeyMap.CollectionKeyMode 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

      public static final MultiKeyMap.CollectionKeyMode 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

      public static MultiKeyMap.CollectionKeyMode[] 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

      public static MultiKeyMap.CollectionKeyMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null