
pl.gdela.socomo.composition.Component Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of socomo-core Show documentation
Show all versions of socomo-core Show documentation
Core parts of the tool for visualizing and analyzing source code modularity of a single java project.
package pl.gdela.socomo.composition;
import java.util.Objects;
public class Component implements Comparable {
public final String name;
public int size;
Component(String name) {
this.name = name;
}
public void incrementSizeBy(int increment) {
size += increment;
}
@Override
public String toString() {
return name;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Component that = (Component) o;
return Objects.equals(this.name, that.name);
}
@Override
public int hashCode() {
return Objects.hash(this.name);
}
@Override
public int compareTo(Component that) {
return this.name.compareTo(that.name);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy