org.bimserver.plugins.PluginBundleIdentifier Maven / Gradle / Ivy
package org.bimserver.plugins;
public class PluginBundleIdentifier {
private String groupId;
private String artifactId;
public PluginBundleIdentifier(String groupId, String artifactId) {
this.groupId = groupId;
this.artifactId = artifactId;
}
public String getHumanReadable() {
return groupId + ":" + artifactId;
}
public String getGroupId() {
return groupId;
}
public String getArtifactId() {
return artifactId;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((artifactId == null) ? 0 : artifactId.hashCode());
result = prime * result + ((groupId == null) ? 0 : groupId.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
PluginBundleIdentifier other = (PluginBundleIdentifier) obj;
if (artifactId == null) {
if (other.artifactId != null)
return false;
} else if (!artifactId.equals(other.artifactId))
return false;
if (groupId == null) {
if (other.groupId != null)
return false;
} else if (!groupId.equals(other.groupId))
return false;
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy