@@ -0,0 +1,1476 @@
+package org.uma.jmetal.util.comparator;%0A%0Aimport org.uma.jmetal.solution.Solution;%0Aimport org.uma.jmetal.util.JMetalException;%0Aimport org.uma.jmetal.util.VectorUtil;%0Aimport org.uma.jmetal.util.checking.Checker;%0Aimport org.uma.jmetal.util.comparator.impl.OverallConstraintViolationComparator;%0A%0Aimport java.io.Serializable;%0Aimport java.util.Comparator;%0A%0A/**%0A * This class implements a solution comparator for dominance checking%0A *%0A * @author Antonio J. Nebro %3Cantonio@lcc.uma.es%3E%0A */%0A@SuppressWarnings(%22serial%22)%0Apublic class DominanceComparatorV2%3CS extends Solution%3C?%3E%3E implements Comparator%3CS%3E, Serializable %7B%0A%0A  /**%0A   * Compares two solutions.%0A   *%0A   * @param solution1 Object representing the first %3Ccode%3ESolution%3C/code%3E.%0A   * @param solution2 Object representing the second %3Ccode%3ESolution%3C/code%3E.%0A   * @return -1, or 0, or 1 if solution1 dominates solution2, both are non-dominated, or solution1%0A   *     is dominated by solution2, respectively.%0A   */%0A  @Override%0A  public int compare(S solution1, S solution2) %7B%0A    Checker.isNotNull(solution1);%0A    Checker.isNotNull(solution2);%0A    Checker.isTrue(%0A        solution1.getNumberOfObjectives() == solution2.getNumberOfObjectives(),%0A        %22Cannot compare because solution1 has %22%0A            + solution1.getNumberOfObjectives()%0A            + %22 objectives and solution2 has %22%0A            + solution2.getNumberOfObjectives());%0A%0A    return VectorUtil.dominanceTest(solution1.getObjectives(), solution2.getObjectives()) ;%0A  %7D%0A%7D%0A

Add class DominanceComparatorV2