Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6363651

(coll) factory methods in collections classes to ease collection creation

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              smarks Stuart Marks
              Reporter:
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: