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