Zig wrote:
On Fri, 04 Apr 2008 20:02:29 -0400, Lew <lew@lewscanon.com> wrote:
Completely wrong. Properties is meant for Strings only.
Take a look at the javadocs for Properties.stringPropertyNames(). At
first glance, one expects this method to cast keySet() to a
Set<String>, but note one difference:
"Properties whose key or value is not of type String are omitted"
There may be some other examples, but this was just the first that
caught my eye.
I think this is an indication that, while Properties are *meant* for
Strings, there may be existing code which uses them for other
things.
I think this is axiomatic. If an API is intended to be used for A,
the documentation explains carefully that it's intended for A, and all
the examples show it being used for A, some perverse bastard is going
to use it for B, C, and D, particularly when that's inferior to the
natural ways of doing those.
misuses, and document how the class would behave if misused.