How to implement java.util.Comparator that orders its elements according to a partial order relation?
java.util.Comparator
For example given a partial order relation a>
When one item is neither "before" nor "after" another, instead of returning a comparison of the hashcode, just return 0. The result will be "total ordering" and "arbitrary" ordering of coincident items.
0