All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tbrugz.sqldiff.compare.DiffComparator Maven / Gradle / Ivy

There is a newer version: 0.9.17
Show newest version
package tbrugz.sqldiff.compare;

import java.util.Comparator;

import tbrugz.sqldiff.model.Diff;

public class DiffComparator implements Comparator {

	@Override
	public int compare(Diff o1, Diff o2) {
		if(o1==null || o2==null) { return 0; }
		//changetype
		int comp = o1.getChangeType().compareTo(o2.getChangeType());
		if(comp!=0) return -comp;
		//difftype
		comp = o1.getObjectType().compareTo(o2.getObjectType());
		//if(comp!=0) return comp;

		return comp;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy