Java data structure that acts like TreeMap + Hash?
问题 I need to enter key-value pairs into a data structure that allows me to retrieve them in ascending order of the key--BUT their may be many keys of the same value. Thus, if the kv-pairs were {10-a, 10-b, 9-c, 8-d, 8-e, 8-f, 4-g, 4-h, 2-i} I would need to retrieve the values in the order: a, b ,c, d, e, f, g, h, i. Are there any data structures in the JAVA API that supports this? I tried using a TreeMap because it kept them in order which allowed me to use TreeMap.lastKey() to retrieve the