Class ImmutableCaseInsensitiveMap<V>

  • Type Parameters:
    V - Value type.
    All Implemented Interfaces:
    java.io.Serializable, java.util.Map<java.lang.String,​V>

    public final class ImmutableCaseInsensitiveMap<V>
    extends AbstractCaseInsensitiveMap<V>
    This Map is a delegate that transforms all keys to lowercase. Null keys and values are not allowed as the backing map is ImmutableMap. On return the keys are unwrapped. Modification of data is not allowed.
    Since:
    17.1.9
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Method Detail

      • copyOf

        public static <V> ImmutableCaseInsensitiveMap<V> copyOf​(java.util.Map<?,​V> map)
        Wraps the original map to an immutable case insensitive map. Despite the method name, this method attempts to avoid actually copying the data when it is safe to do so.
        Type Parameters:
        V - Value type.
        Parameters:
        map - Map to wrap.
        Returns:
        Immutable case insensitive map.
        Throws:
        java.lang.NullPointerException - - if any key, value, or entry is null
        java.lang.IllegalArgumentException - - if two entries have the same key