private static long createPair(int low, int high, boolean ordered) {
    if (ordered) {
      return -(((long)high << 32) + low);
    }
    return low < high ? ((long)low << 32) + high : ((long)high << 32) + low;
  }
private static long createPair(int low, int high, boolean ordered)