Class LinkedCaseInsensitiveMap<V>

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<String,V>
org.jumpmind.util.LinkedCaseInsensitiveMap<V>
All Implemented Interfaces:
Serializable, Cloneable, Map<String,V>
Direct Known Subclasses:
Row

public class LinkedCaseInsensitiveMap<V> extends LinkedHashMap<String,V>
LinkedHashMap variant that stores String keys in a case-insensitive manner, for example for key-based access in a results table.

Preserves the original order as well as the original casing of keys, while allowing for contains, get and remove calls with any case of key.

Does not support null keys.

Since:
3.0
See Also:
  • Constructor Details

    • LinkedCaseInsensitiveMap

      public LinkedCaseInsensitiveMap(Map<String,? extends V> values)
    • LinkedCaseInsensitiveMap

      public LinkedCaseInsensitiveMap()
      Create a new LinkedCaseInsensitiveMap for the default Locale.
      See Also:
    • LinkedCaseInsensitiveMap

      public LinkedCaseInsensitiveMap(Locale locale)
      Create a new LinkedCaseInsensitiveMap that stores lower-case keys according to the given Locale.
      Parameters:
      locale - the Locale to use for lower-case conversion
      See Also:
    • LinkedCaseInsensitiveMap

      public LinkedCaseInsensitiveMap(int initialCapacity)
      Create a new LinkedCaseInsensitiveMap that wraps a LinkedHashMap with the given initial capacity and stores lower-case keys according to the default Locale.
      Parameters:
      initialCapacity - the initial capacity
      See Also:
    • LinkedCaseInsensitiveMap

      public LinkedCaseInsensitiveMap(int initialCapacity, Locale locale)
      Create a new LinkedCaseInsensitiveMap that wraps a LinkedHashMap with the given initial capacity and stores lower-case keys according to the given Locale.
      Parameters:
      initialCapacity - the initial capacity
      locale - the Locale to use for lower-case conversion
      See Also:
  • Method Details