code: public int compare(Performance o1, Performance o2) {
      int	result;
      double	p1;
      double	p2;
  
      if (o1.getEvaluation() != o2.getEvaluation())
        throw new IllegalArgumentException("Comparing different types of performances!");
  
      p1 = o1.getPerformance();
      p2 = o2.getPerformance();
  
      if (p1 < p2)
        result = -1;
      else if (p1 > p2)
        result = 1;
      else
        result = o1.getValues().compareTo(o2.getValues());
  
      // only correlation coefficient/accuracy/kappa obey to this order, for the
      // errors (and the combination of all three), the smaller the number the
      // better -> hence invert them
      if (getMetrics().invert(getEvaluation()))
        result = -result;
  
      return result;
    }
docs: Compares its two arguments for order. Returns a negative integer,
  zero, or a positive integer as the first argument is less than,
  equal to, or greater than the second.
  
  @param o1 	the first performance
  @param o2 	the second performance
  @return 		the order