/** * Optimization hook. */ public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { float thisLeftValue = readFloat(b1, s1); float thatLeftValue = readFloat(b2, s2); if (thisLeftValue == thatLeftValue) { float thisRightValue = readFloat(b1, s1 + 4); float thatRightValue = readFloat(b2, s2 + 4); return (thisRightValue < thatRightValue ? -1 : (thisRightValue == thatRightValue ? 0 : 1)); } return (thisLeftValue < thatLeftValue ? -1 : (thisLeftValue == thatLeftValue ? 0 : 1)); } }