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

org.umlg.java.metamodel.utilities.OJOperationComparator Maven / Gradle / Ivy

There is a newer version: 2.0.15
Show newest version

package org.umlg.java.metamodel.utilities;

import java.util.Comparator;

import org.umlg.java.metamodel.OJOperation;


public class OJOperationComparator implements Comparator {

	public int compare(OJOperation first, OJOperation second) {
		if (first.getVisibility().equals(second.getVisibility())) {
			String firstSignature = first.getSignature();
			String secondSignature = second.getSignature();
			int compareTo = firstSignature.compareTo(secondSignature);
			return compareTo;
        } else {
            Integer value1 = first.getVisibility().getValue();
            Integer value2 = second.getVisibility().getValue();
            return value1.compareTo(value2);
        }
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy