List of usage examples for org.apache.commons.lang3.builder EqualsBuilder append
public EqualsBuilder append(final boolean[] lhs, final boolean[] rhs)
Deep comparison of array of boolean
.
From source file:com.xpn.xwiki.doc.XWikiLink.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }/*from w w w .j a v a 2 s.co m*/ if (!(obj instanceof XWikiLink)) { return false; } XWikiLink o = (XWikiLink) obj; EqualsBuilder builder = new EqualsBuilder(); builder.append(getDocId(), o.getDocId()); builder.append(getLink(), o.getLink()); builder.append(getFullName(), o.getFullName()); return builder.isEquals(); }
From source file:delfos.rs.trustbased.belieffunctions.BeliefFunction.java
@Override public boolean equals(Object obj) { if (obj instanceof BeliefFunction) { BeliefFunction beliefFunction = (BeliefFunction) obj; Set<Parameter> thisParameters = new TreeSet<Parameter>(this.getParameters()); Set<Parameter> otherParameters = new TreeSet<Parameter>(beliefFunction.getParameters()); EqualsBuilder equalsBuilder = new EqualsBuilder(); equalsBuilder = equalsBuilder.append(this.getClass(), beliefFunction.getClass()).append(thisParameters, otherParameters);/*from ww w .j a va 2 s. c o m*/ return equalsBuilder.isEquals(); } else { return false; } }
From source file:ca.uhn.fhir.jpa.entity.ResourceTag.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }/*from ww w.ja va 2 s. co m*/ if (obj == null) { return false; } if (!(obj instanceof ResourceTag)) { return false; } ResourceTag other = (ResourceTag) obj; EqualsBuilder b = new EqualsBuilder(); b.append(getResourceId(), other.getResourceId()); b.append(getTag(), other.getTag()); return b.isEquals(); }
From source file:com.silverpeas.gallery.model.MediaPK.java
/** * Check if an another object is equal to this object * @param other the object to compare to this NodePK * @return true if other is equals to this object * @since 1.0/* w w w.j a v a 2 s. co m*/ */ public boolean equals(Object other) { if (other == null) { return false; } if (getClass() != other.getClass()) { return false; } final MediaPK otherMediaPK = (MediaPK) other; EqualsBuilder matcher = new EqualsBuilder(); matcher.append(getId(), otherMediaPK.getId()); matcher.append(getInstanceId(), otherMediaPK.getInstanceId()); return matcher.isEquals(); }
From source file:ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamUri.java
@Override public boolean equals(Object theObj) { if (this == theObj) { return true; }/*from w w w. j a va 2 s . com*/ if (theObj == null) { return false; } if (!(theObj instanceof ResourceIndexedSearchParamUri)) { return false; } ResourceIndexedSearchParamUri obj = (ResourceIndexedSearchParamUri) theObj; EqualsBuilder b = new EqualsBuilder(); b.append(getParamName(), obj.getParamName()); b.append(getResource(), obj.getResource()); b.append(getUri(), obj.getUri()); return b.isEquals(); }
From source file:ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamNumber.java
@Override public boolean equals(Object theObj) { if (this == theObj) { return true; }// www . jav a 2 s . c o m if (theObj == null) { return false; } if (!(theObj instanceof ResourceIndexedSearchParamNumber)) { return false; } ResourceIndexedSearchParamNumber obj = (ResourceIndexedSearchParamNumber) theObj; EqualsBuilder b = new EqualsBuilder(); b.append(getParamName(), obj.getParamName()); b.append(getResource(), obj.getResource()); b.append(getValue(), obj.getValue()); return b.isEquals(); }
From source file:io.github.rhkiswani.javaff.lang.EqualsHelper.java
@Override protected Boolean doAction(Object... objects) { if (objects.length < 2) { return false; }/*w ww . j a va 2 s . c o m*/ if (objects[0] == null && objects[1] == null) { return true; } if (objects[0] == null) { return false; } if (objects[1] == null) { return false; } if (!objects[0].getClass().equals(objects[1].getClass())) { return false; } List<Field> fields = getFieldsByAnnotation(objects[0], EqualsField.class); if (fields.size() == 0) { return objects[0].equals(objects[1]); } EqualsBuilder equalsBuilder = new EqualsBuilder(); for (Field field : fields) { equalsBuilder.append(reflectionHelper.getFieldValue(objects[0], field.getName()), reflectionHelper.getFieldValue(objects[1], field.getName())); } return equalsBuilder.isEquals(); }
From source file:ca.uhn.fhir.validation.SingleValidationMessage.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }//from w ww . j a v a 2 s. co m if (obj == null) { return false; } if (!(obj instanceof SingleValidationMessage)) { return false; } SingleValidationMessage other = (SingleValidationMessage) obj; EqualsBuilder b = new EqualsBuilder(); b.append(myLocationCol, other.myLocationCol); b.append(myLocationLine, other.myLocationLine); b.append(myLocationString, other.myLocationString); b.append(myMessage, other.myMessage); b.append(mySeverity, other.mySeverity); return b.isEquals(); }
From source file:com.jdom.get.stuff.done.domain.TaskList.java
@Override public boolean equals(Object obj) { if (obj instanceof TaskList) { TaskList other = (TaskList) obj; EqualsBuilder eqBuilder = new EqualsBuilder(); eqBuilder.append(this.getName(), other.getName()); return eqBuilder.isEquals(); }//ww w . j a va 2 s. c o m return false; }
From source file:net.havox.times.model.impl.AbstractChangeAwareClass.java
@Override public boolean equals(Object object) { if (this == object) { return true; } else if (object == null) { return false; } else if (this.getClass() == object.getClass()) { T typedObject = (T) object;// ww w . j a v a 2s .c o m if (this.getId() == null) { return (this == typedObject); } else { EqualsBuilder builder = new EqualsBuilder(); builder.append(this.getId(), typedObject.getId()); return builder.isEquals(); } } return false; }