JDK-6567419 : (coll) Add MultiMap, MultiSet interfaces
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:collections
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: linux
  • CPU: x86
  • Submitted: 2007-06-08
  • Updated: 2012-10-08
  • Resolved: 2010-12-24
Description
A DESCRIPTION OF THE REQUEST :
There are no MultiSet or MultiMap interface specifications. Using the standard Map/Set interface is a bit clumsy, despite there capability to emulate a Multi-variant (as mentioned in online Map doc). I would be happy if just the MultiMap and MultiSet interfaces were specified since I would be implementating my own. I am less concerned about actual implementations (hash-based,tree-based, sorted,linked), though of course, some might scream if interfaces were published without at least a couple implementations ;-). I suppose an AbstractMultiMap and AbstractMultiSet may appease the masses.


JUSTIFICATION :
Though prior bug reports on MultiMap's and MultiSets have been shot down in the past because they are apparently "rarely" used according to Map documentation and also rarely requested, I find that fairly hard to believe. MultiMap's and MultiSet's happen to make fantastic adapters for relational databases or object oriented databases (like the custom one we use at my company).

Comments
EVALUATION There isn't a lot of enthusiasm among the maintainers of the Collection framework to design and implement these interfaces/classes. I personally can't recall having needed one. It would be more likely that a popular package developed outside the JDK would be imported into the JDK after having proved its worth in the real world.
08-06-2007