@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } Im other = (Im) obj; return eq(getAddress(), other.getAddress()) && eq(getLabel(), other.getLabel()) && eq(getPrimary(), other.getPrimary()) && eq(getProtocol(), other.getProtocol()) && eq(getRel(), other.getRel()); }
@Override public int hashCode() { int result = getClass().hashCode(); if (getAddress() != null) { result = 37 * result + getAddress().hashCode(); } if (getLabel() != null) { result = 37 * result + getLabel().hashCode(); } if (getPrimary() != null) { result = 37 * result + getPrimary().hashCode(); } if (getProtocol() != null) { result = 37 * result + getProtocol().hashCode(); } if (getRel() != null) { result = 37 * result + getRel().hashCode(); } return result; } }
/** * Returns whether it has the whether this is the primary instant messaging * address. * * @return whether it has the whether this is the primary instant messaging * address */ public boolean hasPrimary() { return getPrimary() != null; }
/** * Returns whether it has the im protocol. * * @return whether it has the im protocol */ public boolean hasProtocol() { return getProtocol() != null; }
/** * Returns whether it has the label. * * @return whether it has the label */ public boolean hasLabel() { return getLabel() != null; }
/** * Returns whether it has the IM address. * * @return whether it has the IM address */ public boolean hasAddress() { return getAddress() != null; }
/** * Returns whether it has the im type. * * @return whether it has the im type */ public boolean hasRel() { return getRel() != null; }
@Override public int hashCode() { int result = getClass().hashCode(); if (getAddress() != null) { result = 37 * result + getAddress().hashCode(); } if (getLabel() != null) { result = 37 * result + getLabel().hashCode(); } if (getPrimary() != null) { result = 37 * result + getPrimary().hashCode(); } if (getProtocol() != null) { result = 37 * result + getProtocol().hashCode(); } if (getRel() != null) { result = 37 * result + getRel().hashCode(); } return result; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } Im other = (Im) obj; return eq(getAddress(), other.getAddress()) && eq(getLabel(), other.getLabel()) && eq(getPrimary(), other.getPrimary()) && eq(getProtocol(), other.getProtocol()) && eq(getRel(), other.getRel()); }
@Override public int hashCode() { int result = getClass().hashCode(); if (getAddress() != null) { result = 37 * result + getAddress().hashCode(); } if (getLabel() != null) { result = 37 * result + getLabel().hashCode(); } if (getPrimary() != null) { result = 37 * result + getPrimary().hashCode(); } if (getProtocol() != null) { result = 37 * result + getProtocol().hashCode(); } if (getRel() != null) { result = 37 * result + getRel().hashCode(); } return result; } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } Im other = (Im) obj; return eq(getAddress(), other.getAddress()) && eq(getLabel(), other.getLabel()) && eq(getPrimary(), other.getPrimary()) && eq(getProtocol(), other.getProtocol()) && eq(getRel(), other.getRel()); }
System.out.print(" " + im.getAddress()); if (im.getLabel() != null) { System.out.print(" label:" + im.getLabel()); if (im.getRel() != null) { System.out.print(" rel:" + im.getRel()); if (im.getProtocol() != null) { System.out.print(" protocol:" + im.getProtocol()); if (im.getPrimary()) { System.out.print(" (primary) ");