I'd try something like this:
This converts all keys to lowercase when they are first added. Then when getProperty() is called, only the new target key needs to be converted to lowercase - all the existing keys already
are lowercase. Note that I overrode put() rather than setProperty() because I wanted to ahndle what happens during a load() - which calls put(), but not setProperty(). I didn't
test this extensively though, so you may need to experiment some more. The Properties class isn't really designed to be overridden, because it doesn't always document the effects of overriding its methods. You might be better off creating a new Map implementation, which simply forwards most of its calls to an enclosed HashMap instance. If you're using JDK 5.0 you can make a Map<String, String> and save yourself some casting. You might also need to write your own load() and store() methods, but that needn't be too difficult.
[ January 11, 2005: Message edited by: Jim Yingst ]