posted 17 years ago
If duplicate keys are allowed, it's not a key. You're never going to be able to find anything even if you had a collection. If your true requirements provide for "keys" with multiple values, you'll have to iterate through the whole structure anyway to find all possible values.
If that's the case and you know from the start the maximum number pairs you will have, see if use can a two-dimensional array.
Another option is to incorporate your "key" and value into a new Object type. Then make that the value to a true key signature.
Darryl Failla
Sun Certified Java 2 Programmer