code: @Override
      public int compare(Integer o1, Integer o2) {
          double diff = dataArray[o2] - dataArray[o1];
          if (diff == 0) {
              return 0;
          }
          if (sortType == ASCENDING) {
              return (diff > 0) ? -1 : 1;
          } else {
              return (diff > 0) ? 1 : -1;
          }
      }
docs: For ascending,
  return 1 if dataArray[o1] is greater than dataArray[o2]
  return 0 if dataArray[o1] is equal to dataArray[o2]
  return -1 if dataArray[o1] is less than dataArray[o2]
  
  For decending, do it in the opposize way.