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

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: