@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } PostalAddress other = (PostalAddress) obj; return eq(getLabel(), other.getLabel()) && eq(getPrimary(), other.getPrimary()) && eq(getRel(), other.getRel()) && eq(getValue(), other.getValue()); }
/** * Constructs a new instance with the given value. * * @param value address string. */ public PostalAddress(String value) { this(); setValue(value); }
@Override public int hashCode() { int result = getClass().hashCode(); if (getLabel() != null) { result = 37 * result + getLabel().hashCode(); } if (getPrimary() != null) { result = 37 * result + getPrimary().hashCode(); } if (getRel() != null) { result = 37 * result + getRel().hashCode(); } if (getValue() != null) { result = 37 * result + getValue().hashCode(); } return result; }
/** * Returns whether it has the simple string value used to name this address. * * @return whether it has the simple string value used to name this address */ public boolean hasLabel() { return getLabel() != null; }
/** * Returns whether it has the postal address type. * * @return whether it has the postal address type */ public boolean hasRel() { return getRel() != null; }
/** * Returns whether it has the whether this is the primary postal address. * * @return whether it has the whether this is the primary postal address */ public boolean hasPrimary() { return getPrimary() != null; }
@Override public int hashCode() { int result = getClass().hashCode(); if (getLabel() != null) { result = 37 * result + getLabel().hashCode(); } if (getPrimary() != null) { result = 37 * result + getPrimary().hashCode(); } if (getRel() != null) { result = 37 * result + getRel().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; } PostalAddress other = (PostalAddress) obj; return eq(getLabel(), other.getLabel()) && eq(getPrimary(), other.getPrimary()) && eq(getRel(), other.getRel()) && eq(getValue(), other.getValue()); }
@Override public int hashCode() { int result = getClass().hashCode(); if (getLabel() != null) { result = 37 * result + getLabel().hashCode(); } if (getPrimary() != null) { result = 37 * result + getPrimary().hashCode(); } if (getRel() != null) { result = 37 * result + getRel().hashCode(); } if (getValue() != null) { result = 37 * result + getValue().hashCode(); } return result; } }
/** * Constructs a new instance with the given value. * * @param value address string. */ public PostalAddress(String value) { this(); setValue(value); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } PostalAddress other = (PostalAddress) obj; return eq(getLabel(), other.getLabel()) && eq(getPrimary(), other.getPrimary()) && eq(getRel(), other.getRel()) && eq(getValue(), other.getValue()); }
/** * Constructs a new instance with the given value. * * @param value address string. */ public PostalAddress(String value) { this(); setValue(value); }