/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package SchedulesRecovery;

import java.util.Comparator;
import org.javatuples.Quartet;

/**
 *
 * @author frabe
 */
public class ScheduleStateComparator implements Comparator< Quartet<boolean[][], boolean[][], Integer, Integer> > {
    public int compare(Quartet<boolean[][], boolean[][], Integer, Integer> o1, Quartet<boolean[][], boolean[][], Integer, Integer> o2) {
        int totalCostCmp = o1.getValue2().compareTo(o2.getValue2());
        if (totalCostCmp !=0) {
            return totalCostCmp;
        }
        int remainingActionsCmp = o2.getValue3().compareTo(o1.getValue3());
        return remainingActionsCmp;
    }
}
