@Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Account)) { return false; } Account that = (Account) obj; return (equalsIgnoreNull(this.getId(), that.getId()) && ObjectUtils.nullSafeEquals(this.getFirstName(), that.getFirstName()) && ObjectUtils.nullSafeEquals(this.getLastName(), that.getLastName())); }
public Account(final Account account) { this(account.getId(), account.getFirstName(), account.getLastName()); }