Here you can find the source of flip(long a)
private static long flip(long a)
//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 ww . j av a 2s . 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; } }