/*
 * parseTreeComparator.java
 *
 * Created on 13 oktober 2006, 13:07
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package DOPParser;

/**
 *
 * @author gideon
 */
import java.util.*;

public class parseTreeComparator implements Comparator<parseTree>{
    
    /** Creates a new instance of parseTreeComparator */
    public parseTreeComparator() {
    }
    
    public int compare(parseTree a, parseTree b) {
        if (a.getProbability() < b.getProbability()) return -1;
        if (a.getProbability() == b.getProbability()) return 0;
        return 1;
    }
}
