Preserve order using a LinkedHashSet
Brought to you by:
szkiba
In BasicMultiMap, entrySet() does a copy from the underlying LinkedHashSet's keySet() to a new Set<Entry<K, V>>. Because the copy is made to a HashSet rather than a LinkedHashSet, order is not preserved, which is annoying.
A workaround appears to be to iterate over BasicMultiMap.keySet() and then look up each value, but that should not be necessary.
This is significant when iterating over a Section's entries when order matters.