package com.capgemini.reports.definition.r20report.comparator;

import com.capgemini.reports.changeobjects.change.TcChangeRequestRevision;

import java.io.Serializable;
import java.util.Comparator;

/**
 * This class will allow to compare two changes.
 */
public class ChangeComparator implements Comparator<TcChangeRequestRevision>, Serializable {
    private static final long serialVersionUID = -2191199657528201566L;

    /**
     * @param obj1 first change to compare
     * @param obj2 second change to compare
     */
    @Override
    public int compare(final TcChangeRequestRevision obj1, final TcChangeRequestRevision obj2) {
        return obj1.getItemId().compareTo(obj2.getItemId());
    }
}
