Great. > I believe that this difficulty is the reason why asMap(Object[]) was never > included in the JDK, but toMap() was. > > Here is my solution: > - Hashing - document the behaviour, stating that the Map will > behave poorly > as its size grows. And that it returns the first matched key. > > - Changing the underlying objects - the best solution I can think of is to > treat what we have previously considered invalid values as both key and > value. Thus > new Object[] {null, "abba", new Object[] {"foo", "bar"}} > has 3 key value entries: > null -> null > "abba" -> "abba" > "foo" -> "bar" > > This way, the Map contents are always valid (ignoring the duplicate keys > issue, which cannot be solved) > > - values, entrySet, keySet, iterator - implemented as best per the spec > > However, before any work occurs, I'd like to ask other [lang] > committers if > they agree that such a beast is still useful, or whether it is too loose.
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>