// Path: src/main/java/com/cedarsoftware/util/StringUtilities.java
// public static int hashCodeIgnoreCase(String s)
// {
//     if (s == null)
//     {
//         return 0;
//     }
//     final int len = s.length();
//     int hash = 0;
//     for (int i = 0; i < len; i++)
//     {
//         hash = 31 * hash + Character.toLowerCase((int)s.charAt(i));
//     }
//     return hash;
// }


import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentSkipListMap;
import static com.cedarsoftware.util.StringUtilities.hashCodeIgnoreCase;
            {
                return (K)((CaseInsensitiveString)superKey).original;
            }
            return superKey;
        }

        public K getOriginalKey()
        {
            return super.getKey();
        }

        public V setValue(V value)
        {
            return map.put(super.getKey(), value);
        }
    }

    /**
     * Class used to wrap String keys.  This class ignores the
     * case of Strings when they are compared.  Based on known usage,
     * null checks, proper instance, etc. are dropped.
     */
    public static final class CaseInsensitiveString implements Comparable
    {
        private final String original;
        private final int hash;

        public CaseInsensitiveString(String string)
        {
            original = string;
// Path: src/main/java/com/cedarsoftware/util/StringUtilities.java
// public static int hashCodeIgnoreCase(String s)
// {
//     if (s == null)
//     {
//         return 0;
//     }
//     final int len = s.length();
//     int hash = 0;
//     for (int i = 0; i < len; i++)
//     {
//         hash = 31 * hash + Character.toLowerCase((int)s.charAt(i));
//     }
//     return hash;
// }


// Path: src/main/java/com/cedarsoftware/util/CaseInsensitiveMap.java
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentSkipListMap;
import static com.cedarsoftware.util.StringUtilities.hashCodeIgnoreCase;

            {
                return (K)((CaseInsensitiveString)superKey).original;
            }
            return superKey;
        }

        public K getOriginalKey()
        {
            return super.getKey();
        }

        public V setValue(V value)
        {
            return map.put(super.getKey(), value);
        }
    }

    /**
     * Class used to wrap String keys.  This class ignores the
     * case of Strings when they are compared.  Based on known usage,
     * null checks, proper instance, etc. are dropped.
     */
    public static final class CaseInsensitiveString implements Comparable
    {
        private final String original;
        private final int hash;

        public CaseInsensitiveString(String string)
        {
            original = string;
            hash = hashCodeIgnoreCase(string);  // no new String created unlike .toLowerCase()