Here you can find the source of flip(int value)
private static int flip(int value)
//package com.java2s; //Licensed under the Apache License, Version 2.0 (the "License"); public class Main { private static int flip(int value) { return value ^ Integer.MIN_VALUE; }//from w w w . j ava 2 s .co m /** * A (self-inverse) bijection which converts the ordering on unsigned longs to the ordering on longs, that is, * {@code a <= b} as unsigned longs if and only if {@code flip(a) <= flip(b)} as signed longs. */ private static long flip(long a) { return a ^ Long.MIN_VALUE; } }