google / guava

Google core libraries for Java
Apache License 2.0
50.18k stars 10.91k forks source link

Multimap with navigable keys and arbitrary semantic. #2502

Open JackieKu opened 8 years ago

JackieKu commented 8 years ago

This is too restrictive for many usages requiring navigable keys. In our case the values are simply not sortable, could be duplicated, but the insertion order should be maintained.

An API like MultimapBuilder.navigableKeys() would be appreciated.

cpovirk commented 6 years ago

Sorry that this has gotten no response. You might be able to get some navigable features from the MultimapBuilder.treeKeys().arrayListValues() multimap's asMap() view (though you'd have to cast). We should still give some thought to whether we could provide a better API.