use of org.apache.commons.lang3.builder.EqualsBuilder in project xwiki-platform by xwiki.
the class AbstractNotificationPreference method equals.
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null) {
return false;
}
// Here, we only compute a subset of the properties, because we want to say equals() == true if the other
// preference is about the same event type, etc...
// See:
// org.xwiki.notifications.preferences.script.NotificationPreferenceScriptService.getCorrespondingPreference()
// and:
// DefaultNotificationPreferenceManager.getAllPreferences(org.xwiki.model.reference.DocumentReference)
// to be sure you don't break anything by changing this method.
AbstractNotificationPreference that = (AbstractNotificationPreference) o;
EqualsBuilder equalsBuilder = new EqualsBuilder();
equalsBuilder.append(that.format, format);
equalsBuilder.append(that.properties, properties);
return equalsBuilder.isEquals();
}
use of org.apache.commons.lang3.builder.EqualsBuilder in project cals-api by ca-cwds.
the class CountyDTO method equals.
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
CountyDTO countyDTO = (CountyDTO) obj;
EqualsBuilder equalsBuilder = new EqualsBuilder();
equalsBuilder.appendSuper(super.equals(obj));
equalsBuilder.append(lisCode, countyDTO.lisCode);
return equalsBuilder.isEquals();
}
use of org.apache.commons.lang3.builder.EqualsBuilder in project api-core by ca-cwds.
the class IssueDetails method equals.
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
IssueDetails issueDetails = (IssueDetails) obj;
EqualsBuilder equalsBuilder = new EqualsBuilder();
equalsBuilder.append(getCode(), issueDetails.code);
equalsBuilder.append(getProperty(), issueDetails.property);
equalsBuilder.append(getType(), issueDetails.getType());
equalsBuilder.append(getUserMessage(), issueDetails.getUserMessage());
return equalsBuilder.isEquals();
}
use of org.apache.commons.lang3.builder.EqualsBuilder in project ANNIS by korpling.
the class DataObject method equals.
@Override
public boolean equals(final Object obj) {
// enforce equals contract (turn on debugging for this class to see the bug)
if (obj == null)
return false;
if (this.getClass() != obj.getClass())
return false;
final EqualsBuilder equalsBuilder = new EqualsBuilder();
final Object _this = this;
forEachFieldDo(new FieldCallBackEqualsImpl(_this, obj, equalsBuilder));
return equalsBuilder.isEquals();
}
use of org.apache.commons.lang3.builder.EqualsBuilder in project cas by apereo.
the class DefaultAuthentication method isEqualTo.
@Override
public boolean isEqualTo(final Authentication auth2) {
if (auth2 == null) {
return false;
}
val builder = new EqualsBuilder();
builder.append(getPrincipal(), auth2.getPrincipal());
builder.append(getCredentials(), auth2.getCredentials());
builder.append(getSuccesses(), auth2.getSuccesses());
return builder.isEquals();
}
Aggregations