I java a java.util.Properties
object and I want to obtain another one with the same pairs but keys are converted to values and viceversa.
If there are collision (i.e. there are two equal values) then just pick as value an arbitrary key.
What is the shortest way to do it.
Feel free to use libraries, commons-collections, or whatever.