gr.uom.java.xmi.UMLRealization 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 UMLRealization implements Comparable {
private UMLClass client;
private String supplier;
public UMLRealization(UMLClass client, String supplier) {
this.supplier = supplier;
this.client = client;
}
public String getSupplier() {
return supplier;
}
public UMLClass getClient() {
return client;
}
public boolean equals(Object o) {
if(this == o) {
return true;
}
if(o instanceof UMLRealization) {
UMLRealization umlRealization = (UMLRealization)o;
return this.client.equals(umlRealization.client) &&
this.supplier.equals(umlRealization.supplier);
}
return false;
}
public String toString() {
return client + "->" + supplier;
}
public int compareTo(UMLRealization realization) {
return this.toString().compareTo(realization.toString());
}
}