docs: @Override
    public int compare(S solution1, S solution2) {
      int result ;
      if (solution1 == null) {
        if (solution2 == null) {
          result = 0;
        } else {
          result = 1 ;
        }
      } else if (solution2 == null) {
        result = -1;
      } else {
        double distance1 = Double.MIN_VALUE ;
        double distance2 = Double.MIN_VALUE ;
  
        if (crowdingDistance.getAttribute(solution1) != null) {
          distance1 = (double) crowdingDistance.getAttribute(solution1);
        }
  
        if (crowdingDistance.getAttribute(solution2) != null) {
          distance2 = (double) crowdingDistance.getAttribute(solution2);
        }
  
        if (distance1 > distance2) {
          result = -1;
        } else  if (distance1 < distance2) {
          result = 1;
        } else {
          result = 0;
        }
      }
  
      return result ;
    }