I use Guava Multimap:
Multimap<Integer, String> commandMap = LinkedHashMultimap.create();
...
actionMap.put(index, "string"); // Put value at the end of list.
This command put value at the end of list. But I need to be able to add both to the end and beginning.
Is there a way to solve this?
This isn’t a
ListMultimap, it’s aSetMultimap. If you want aListMultimap, useArrayListMultimaporLinkedListMultimap.