/** * Checks if this property has the same {@link DavPropertyName name} * and value as the given one. * * @param obj the object to compare to * @return <code>true</code> if the 2 objects are equal; * <code>false</code> otherwise */ @Override public boolean equals(Object obj) { if (obj instanceof DavProperty) { DavProperty<?> prop = (DavProperty<?>) obj; boolean equalName = getName().equals(prop.getName()); boolean equalValue = (getValue() == null) ? prop.getValue() == null : getValue().equals(prop.getValue()); return equalName && equalValue; } return false; }
/** * Checks if this property has the same {@link DavPropertyName name} * and value as the given one. * * @param obj the object to compare to * @return <code>true</code> if the 2 objects are equal; * <code>false</code> otherwise */ @Override public boolean equals(Object obj) { if (obj instanceof DavProperty) { DavProperty<?> prop = (DavProperty<?>) obj; boolean equalName = getName().equals(prop.getName()); boolean equalValue = (getValue() == null) ? prop.getValue() == null : getValue().equals(prop.getValue()); return equalName && equalValue; } return false; }
/** * Checks if this property has the same {@link DavPropertyName name} * and value as the given one. * * @param obj the object to compare to * @return <code>true</code> if the 2 objects are equal; * <code>false</code> otherwise */ public boolean equals(Object obj) { if (obj instanceof DavProperty) { DavProperty prop = (DavProperty) obj; boolean equalName = getName().equals(prop.getName()); boolean equalValue = (getValue() == null) ? prop.getValue() == null : getValue().equals(prop.getValue()); return equalName && equalValue; } return false; }