@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } DateOption other = (DateOption) obj; if (nullValue != other.nullValue) { return false; } if (nullValue == false && entity.equals(other.entity) == false) { return false; } return true; }
/** * Returns whether both this object and the specified value represents an equivalent value or not. * @param other the target value (nullable) * @return {@code true} if this object has the specified value, otherwise {@code false} */ public boolean has(Date other) { if (isNull()) { return other == null; } return entity.equals(other); }