@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final FakeRosterEntry other = (FakeRosterEntry) obj; if (this.occupant != other.occupant && (this.occupant == null || !this.occupant.equals(other.occupant))) { return false; } return true; }