Code example for Date

Methods: equals

0
        if (o == null || getClass() != o.getClass()) return false;
 
        Family family1 = (Family) o;
 
        if (idFamily != family1.idFamily) return false;
        if (createDate != null ? !createDate.equals(family1.createDate) : family1.createDate != null) return false;
        if (email != null ? !email.equals(family1.email) : family1.email != null) return false;
        if (family != null ? !family.equals(family1.family) : family1.family != null) return false;
        if (password != null ? !password.equals(family1.password) : family1.password != null) return false;
 
        return true; 
    } 
 
    @Override 
    public int hashCode() { 
        int result = idFamily;
        result = 31 * result + (family != null ? family.hashCode() : 0);
        result = 31 * result + (password != null ? password.hashCode() : 0);
        result = 31 * result + (email != null ? email.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        return result;