/** * Perform an comparison between two unsigned integers. * * @param a The first value to compare. * @param b The second value to compare. * @return 1, 0 or -1 if a is greater than, equal to, or less than b. */ public static int compareUInt(int a, int b) { if (a == b) { return 0; } long ua = ui(a); long ub = ui(b); return (ua < ub) ? (-1) : 1; }