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

com.ecyshor.cassmig.model.MigrationComparator Maven / Gradle / Ivy

There is a newer version: 1.1.6
Show newest version
package com.ecyshor.cassmig.model;

import java.util.Comparator;

public class MigrationComparator implements Comparator {

	private static final MigrationComparator comparator = new MigrationComparator();

	private MigrationComparator() {

	}

	public int compare(BaseMigration first, BaseMigration second) {
		if (first.getOrder() != second.getOrder())
			return Integer.compare(first.getOrder(), second.getOrder());
		else
			return first.getMd5Sum().compareTo(second.getMd5Sum());
	}

	public static MigrationComparator getInstance() {
		return comparator;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy