Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6363651
Votes 0
Synopsis (coll) factory methods in collections classes to ease collection creation
Category java:classes_util
Reported Against
Release Fixed
State 3-Accepted, request for enhancement
Priority: 4-Low
Related Bugs 5092426
Submit Date 15-DEC-2005
Description
A DESCRIPTION OF THE REQUEST :
Creating new instances of generic collections can be very verbose.
e.g.
Map<Integer, FindMatchResults> resultsMap = new HashMap<Integer, FindMatchResults>();

Create factory methods in the various Collections subclasses that use capture to reduce the amount of typing, so I can go:

Map<Integer, FindMatchResults> resultsMap = HashMap.create();


JUSTIFICATION :
Simpler code is easier to read, write and debug.
Construction of new generic collections classes is extremely common, and the verbosity makes code harder to work with.
Posted Date : 2005-12-15 09:23:41.0
Work Around
N/A
Evaluation
N/A
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang