gr.uom.java.xmi.UMLGeneralization Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of refactoring-miner Show documentation
Show all versions of refactoring-miner Show documentation
RefactoringMiner is a library/API written in Java that can detect refactorings applied in the history of a Java project.
package gr.uom.java.xmi;
public class UMLGeneralization implements Comparable {
private UMLClass child;
private String parent;
public UMLGeneralization(UMLClass child, String parent) {
this.child = child;
this.parent = parent;
}
public UMLClass getChild() {
return child;
}
public String getParent() {
return parent;
}
public boolean equals(Object o) {
if(this == o) {
return true;
}
if(o instanceof UMLGeneralization) {
UMLGeneralization umlGeneralization = (UMLGeneralization)o;
return this.child.equals(umlGeneralization.child) &&
this.parent.equals(umlGeneralization.parent);
}
return false;
}
public String toString() {
return child + "->" + parent;
}
public int compareTo(UMLGeneralization generalization) {
return this.toString().compareTo(generalization.toString());
}
}