@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } CustomProperty other = (CustomProperty) obj; return eq(getName(), other.getName()) && eq(getType(), other.getType()) && eq(getUnit(), other.getUnit()) && eq(getValue(), other.getValue()); }
/** * Constructs a new instance with the given value. * * @param value value. */ public CustomProperty(String value) { this(); setValue(value); }
@Override public int hashCode() { int result = getClass().hashCode(); if (getName() != null) { result = 37 * result + getName().hashCode(); } if (getType() != null) { result = 37 * result + getType().hashCode(); } if (getUnit() != null) { result = 37 * result + getUnit().hashCode(); } if (getValue() != null) { result = 37 * result + getValue().hashCode(); } return result; } }
/** * Returns whether it has the can be a URI to indicate a specific ontology. * * @return whether it has the can be a URI to indicate a specific ontology */ public boolean hasName() { return getName() != null; }
/** * Returns whether it has the units of data - can also be a URI to indicate a * specific ontology. * * @return whether it has the units of data - can also be a URI to indicate a * specific ontology */ public boolean hasUnit() { return getUnit() != null; }
/** * Returns whether it has the datatype such as string, integer, and date, or * an ontology-specific URI. * * @return whether it has the datatype such as string, integer, and date, or * an ontology-specific URI */ public boolean hasType() { return getType() != null; }
@Override public int hashCode() { int result = getClass().hashCode(); if (getName() != null) { result = 37 * result + getName().hashCode(); } if (getType() != null) { result = 37 * result + getType().hashCode(); } if (getUnit() != null) { result = 37 * result + getUnit().hashCode(); } if (getValue() != null) { result = 37 * result + getValue().hashCode(); } return result; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } CustomProperty other = (CustomProperty) obj; return eq(getName(), other.getName()) && eq(getType(), other.getType()) && eq(getUnit(), other.getUnit()) && eq(getValue(), other.getValue()); }
@Override public int hashCode() { int result = getClass().hashCode(); if (getName() != null) { result = 37 * result + getName().hashCode(); } if (getType() != null) { result = 37 * result + getType().hashCode(); } if (getUnit() != null) { result = 37 * result + getUnit().hashCode(); } if (getValue() != null) { result = 37 * result + getValue().hashCode(); } return result; } }
/** * Constructs a new instance with the given value. * * @param value value. */ public CustomProperty(String value) { this(); setValue(value); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } CustomProperty other = (CustomProperty) obj; return eq(getName(), other.getName()) && eq(getType(), other.getType()) && eq(getUnit(), other.getUnit()) && eq(getValue(), other.getValue()); }
/** * Constructs a new instance with the given value. * * @param value value. */ public CustomProperty(String value) { this(); setValue(value); }