Skip navigation links
org.apache.commons.collections4.map

Class CaseInsensitiveMap<K,V>

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Serialisation version
        See Also:
        Constant Field Values
    • Constructor Detail

      • CaseInsensitiveMap

        public CaseInsensitiveMap()
        Constructs a new empty map with default size and load factor.
      • CaseInsensitiveMap

        public CaseInsensitiveMap(int initialCapacity)
        Constructs a new, empty map with the specified initial capacity.
        Parameters:
        initialCapacity - the initial capacity
        Throws:
        java.lang.IllegalArgumentException - if the initial capacity is negative
      • CaseInsensitiveMap

        public CaseInsensitiveMap(int initialCapacity,
                                  float loadFactor)
        Constructs a new, empty map with the specified initial capacity and load factor.
        Parameters:
        initialCapacity - the initial capacity
        loadFactor - the load factor
        Throws:
        java.lang.IllegalArgumentException - if the initial capacity is negative
        java.lang.IllegalArgumentException - if the load factor is less than zero
      • CaseInsensitiveMap

        public CaseInsensitiveMap(java.util.Map<? extends K,? extends V> map)
        Constructor copying elements from another map.

        Keys will be converted to lower case strings, which may cause some entries to be removed (if string representation of keys differ only by character case).

        Parameters:
        map - the map to copy
        Throws:
        java.lang.NullPointerException - if the map is null
    • Method Detail

      • writeObject

        private void writeObject(java.io.ObjectOutputStream out)
                          throws java.io.IOException
        Write the map out using a custom routine.
        Throws:
        java.io.IOException
      • readObject

        private void readObject(java.io.ObjectInputStream in)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Read the map in using a custom routine.
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException