I'd like to be able to initialise collections in Java

Posted Mon, 19 Feb 2007 11:43:00 GMT

Wouldn’t it be nice if you could say something like?

Map measures = new Map ( "Height" -> 175, "Weight" -> 69 )

as you can do in Perl, or even :

Map measures = new Map ( new MapEntry("Height", 175), new MapEntry("Weight", 69) )

….yes, it would be nice…

Comments

Trackbacks

Use the following link to trackback from your own site:
http://supplesoftware.com/articles/trackback/49

(leave url/email »)

  

Home

Who's George?

Recent entries