/Users/lyon/j4p/src/javagroup/util/CaseInsensitiveHashtable.java
|
1 package javagroup.util;
2
3 import java.util.Hashtable;
4
5 public class CaseInsensitiveHashtable extends Hashtable {
6
7 public Object put(Object key, Object value) {
8 return super.put(toLowerCase(key), value);
9 }
10
11 public Object get(Object key) {
12 return super.get(toLowerCase(key));
13 }
14
15 public Object toLowerCase(Object obj) {
16 if (obj instanceof String)
17 obj = ((String) obj).toLowerCase();
18
19 return obj;
20 }
21
22 }
23