class PotentialColumnComparator implements Comparator<PotentialColumn>, Serializable {

    @Override
    public int compare(PotentialColumn o1, PotentialColumn o2)
    {
        int o1MaxSuccesses = getMaxSuccesses(o1);
        int o2MaxSuccesses = getMaxSuccesses(o2);

        int compareValue = 0;

        if (o1MaxSuccesses > o2MaxSuccesses)
        {
            compareValue = -1;
        }
        else if (o2MaxSuccesses > o1MaxSuccesses)
        {
            compareValue = 1;
        }

        return compareValue;
    }

}