A (self-inverse) bijection which converts the ordering on unsigned longs to the ordering on longs, that is, a <= b as unsigned longs if and only if flip(a) <= flip(b) as signed longs.
(long a)
| 62 | * signed longs. |
| 63 | */ |
| 64 | private static long flip(long a) { |
| 65 | return a ^ Long.MIN_VALUE; |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * Compares the two specified {@code long} values, treating them as unsigned values between |