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 Stephen Colebourne
t" <[EMAIL PROTECTED]> Sent: Monday, October 14, 2002 10:59 AM Subject: RE: [lang] ArrayUtils toMap asMap, [was Re: [collections] [PATCH] MapUtil] > Stephen, > > > > By comparison with the JDK, the method asList(Object[]) is on > > Arrays. Thus I > > have a

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: > -

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

2002-10-13 Thread Stephen Colebourne
tz Petersen" <[EMAIL PROTECTED]> To: "Commons Dev" <[EMAIL PROTECTED]> Sent: Sunday, October 13, 2002 2:34 PM Subject: [collections] [PATCH] MapUtil > The patch contains: > > MapUtil#toMap(Object[]) - converts the array to a Map > MapUtil#asMap(Object[]) - wraps an

[collections] [PATCH] MapUtil

2002-10-13 Thread Moritz Petersen
The patch contains: MapUtil#toMap(Object[]) - converts the array to a Map MapUtil#asMap(Object[]) - wraps an ArrayMap around the array MapUtil.ArrayMap- inner class for #asMap(Object[]) TestMapUtil#testToMap() TestMapUtil#testAsMap() Patch was applied: diff -u -r1.13 MapUtils.java dif