org.constretto.Property Maven / Gradle / Ivy
The newest version!
package org.constretto;
/**
* @author Kaare Nilsen
*/
public class Property {
private final String key;
private final String value;
public Property(String key, String value) {
this.value = value;
this.key = key;
}
public String getKey() {
return key;
}
public String getValue() {
return value;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Property)) return false;
Property property = (Property) o;
if (!key.equals(property.key)) return false;
if (!value.equals(property.value)) return false;
return true;
}
@Override
public int hashCode() {
int result = key.hashCode();
result = 31 * result + value.hashCode();
return result;
}
@Override
public String toString() {
return "Property{" +
"key='" + key + '\'' +
", value='" + value + '\'' +
'}';
}
}