how to write write a set for unordered pair in Java
<p>I need to have a Set (HashSet) such that if I insert a pair <code>(a, b)</code> and if <code>(b, a)</code> is already in the set, the insertion would just be ignored. How to do this in Java?</p>

<p>Many thanks!</p>
