CaseInsensitiveTreeMap extends AbstractMap<String,V> { public V get(Object obj) { if (!(obj instanceof String)) return null; String lower = ((String)obj).toLowerCase(); String proper = caseConverter.get(lower); if (proper == null) return null; return data.get(proper); } CaseInsensitiveTreeMap(); boolean containsKey(Object obj); V get(Object obj); V put(String key, V val); V remove(Object obj); Set<Map.Entry<String,V>> entrySet();  }
@Test public void testGet() { CaseInsensitiveTreeMap<Integer> m = new CaseInsensitiveTreeMap<>(); m.put("a", 3); m.put("b", 0); assertEquals(3, (int)m.get("a")); assertEquals(3, (int)m.get("A")); assertEquals(0, (int)m.get("b")); assertEquals(0, (int)m.get("B")); m.put("a", 2); m.checkStructure(); m.put("B", 5); m.checkStructure(); assertEquals(2, (int)m.get("a")); assertEquals(2, (int)m.get("A")); assertEquals(5, (int)m.get("b")); assertEquals(5, (int)m.get("B")); }