commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject Re: [collections] Re: Commons Collections:Suggested MapUtils enhancements
Date Sat, 12 Oct 2002 20:32:33 GMT
See http://jakarta.apache.org/site/source.html for submissions details.

toMap(Object[]) is used to initialise a Map, such as a HashMap with data.
asMap(Object[]) exposes an array as a Map, thus can't have its size changed

  toMap(Object[])
is the same as
  map.putAll(MapUtils.asMap(Object[]));
thus its not essential, but a useful convenience.

Both are useful methods. The former should probably have a variant called
  toMap(Object[], Map)
that adds the contents of the array to the specified map.

Stephen

----- Original Message -----
From: "Moritz Petersen" <moritzpetersen@mac.com>
> Hi Phil, Stephen,
>
> the MapUtils.asMap(Object[]) method is finished. What to do now? How
> should I make it available?
>
> To the next steps: Maybe I am too stupid, but I don't see the reason
> for a toMap(Object[]) method. Could you please explain the advantage of
> it (especially versus asMap(Object[]))?
>
> Bye,
>
> Moritz.
>
>
> --
> To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message