package org.jboss.tools.runtime.reddeer;
/**
* Class represents a runtime table entry in "Preferences" --> "JBoss Runtime Detection" --> "Search..."
*
* @author tsedmik
*/
public class RuntimeEntry {
private String name;
private String type;
private String version;
private String location;
public RuntimeEntry(String name, String type, String version, String location) {
super();
this.name = name;
this.type = type;
this.version = version;
this.location = location;
}
public RuntimeEntry() {
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((location == null) ? 0 : location.hashCode());
result = prime * result + ((type == null) ? 0 : type.hashCode());
result = prime * result + ((version == null) ? 0 : version.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;
RuntimeEntry other = (RuntimeEntry) obj;
if (location == null) {
if (other.location != null)
return false;
} else if (!location.equals(other.location))
return false;
if (type == null) {
if (other.type != null)
return false;
} else if (!type.equals(other.type))
return false;
if (version == null) {
if (other.version != null)
return false;
} else if (!version.equals(other.version))
return false;
return true;
}
}