例子
[code] public static void main(String[] args) {
Map m = new CaseInsensitiveMap();
m.put("CaseKey", "hello");
System.out.println(m.get("CaseKey"));
System.out.println(m.get("casekey"));
System.out.println(m.get("caSekEy"));
}[/code]
结果:
hello
hello
hello
[code] public static void main(String[] args) {
Map m = new CaseInsensitiveMap();
m.put("CaseKey", "hello");
System.out.println(m.get("CaseKey"));
System.out.println(m.get("casekey"));
System.out.println(m.get("caSekEy"));
}[/code]
结果:
hello
hello
hello