RE: [lang] ArrayUtils toMap asMap, [was Re: [collections] [PATCH] MapUtil]

2002-10-15 Thread Moritz Petersen
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. -

RE: [lang] ArrayUtils toMap asMap, [was Re: [collections] [PATCH] MapUtil]

2002-10-14 Thread Moritz Petersen
Stephen, By comparison with the JDK, the method asList(Object[]) is on Arrays. Thus I have applied the patch to ArrayUtils in [lang] instead of [collections]. you're right, that makes sense. When I looked at asMap(Object[]) I discovered certain problems that we hadn't considered: - the

[lang] ArrayUtils toMap asMap, [was Re: [collections] [PATCH] MapUtil]

2002-10-13 Thread Stephen Colebourne
Life is never simpleI started applying the patch, but hit some problems By comparison with the JDK, the method asList(Object[]) is on Arrays. Thus I have applied the patch to ArrayUtils in [lang] instead of [collections]. toMap(Object[]) fitted fine. When I looked at asMap(Object[]) I