/** * Create a new CaseInsensitiveMap. * * @param <K> the key type * @param <V> the value type * @param initialCapacity the initial capacity * @return the object */ public static <K, V> CaseInsensitiveMap<V> caseInsensitiveMap() { return new CaseInsensitiveMap<V>(); }
@Override public V get(Object key) { return super.get(toUpper(key)); }
@Override public V put(String key, V value) { return super.put(toUpper(key), value); }
@Override public boolean containsKey(Object key) { return super.containsKey(toUpper(key)); }
/** * Create a new hash map. Depending on the configuration, the key is case * sensitive or case insensitive. * * @param <V> the value type * @return the hash map */ public <V> HashMap<String, V> newStringMap() { return dbSettings.databaseToUpper ? new HashMap<String, V>() : new CaseInsensitiveMap<V>(); }
@Override public V remove(Object key) { return super.remove(toUpper(key)); }