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.nmote.smpp.BindReceiverPDU.java
/** * Checks if <code>o</code> and this object are equal. * * @return true if objects are equal, false otherwise */// w w w . j a va 2 s. c o m public boolean equals(Object o) { boolean result; if (o instanceof BindReceiverPDU) { BindReceiverPDU p = (BindReceiverPDU) o; EqualsBuilder b = new EqualsBuilder(); b.append(p.getSequence(), getSequence()); b.append(p.getStatus(), getStatus()); // Appending mandatory parameters b.append(p.system_id, system_id); b.append(p.password, password); b.append(p.system_type, system_type); b.append(p.interface_version, interface_version); b.append(p.address_range, address_range); // Appending optional parameters b.append(p.getParameters(), getParameters()); result = b.isEquals(); } else { result = false; } return result; }
From source file:com.nmote.smpp.BindTransceiverPDU.java
/** * Checks if <code>o</code> and this object are equal. * * @return true if objects are equal, false otherwise *///from www . ja v a 2 s . c om public boolean equals(Object o) { boolean result; if (o instanceof BindTransceiverPDU) { BindTransceiverPDU p = (BindTransceiverPDU) o; EqualsBuilder b = new EqualsBuilder(); b.append(p.getSequence(), getSequence()); b.append(p.getStatus(), getStatus()); // Appending mandatory parameters b.append(p.system_id, system_id); b.append(p.password, password); b.append(p.system_type, system_type); b.append(p.interface_version, interface_version); b.append(p.address_range, address_range); // Appending optional parameters b.append(p.getParameters(), getParameters()); result = b.isEquals(); } else { result = false; } return result; }
From source file:com.silverpeas.gallery.web.PhotoEntityMatcher.java
@Override public boolean matches(final Object item) { boolean match = false; if (item instanceof PhotoEntity) { final PhotoEntity actual = (PhotoEntity) item; final EqualsBuilder matcher = new EqualsBuilder(); matcher.appendSuper(actual.getURI().toString().endsWith("/gallery/componentName5/albums/3/photos/7")); matcher.appendSuper(actual.getParentURI().toString().endsWith("/gallery/componentName5/albums/3")); matcher.append("photo", actual.getType()); matcher.append(expected.getId(), actual.getId()); matcher.append(expected.getTitle(), actual.getTitle()); matcher.append(expected.getDescription(), actual.getDescription()); matcher.appendSuper(//from w ww . j a v a 2 s. c om actual.getPreviewUrl().endsWith("/gallery/componentName5/albums/3/photos/7/previewContent")); matcher.appendSuper(actual.getUrl().endsWith("/gallery/componentName5/albums/3/photos/7/content")); match = matcher.isEquals(); } return match; }
From source file:com.github.jgility.core.requirement.ProductStory.java
@Override public boolean equals(Object obj) { if (obj instanceof ProductStory) { ProductStory story = (ProductStory) obj; EqualsBuilder builder = new EqualsBuilder(); builder.append(id, story.id); builder.append(title, story.title); builder.append(description, story.description); builder.append(createDate, story.createDate); builder.append(estimated, story.estimated); builder.append(priority, story.priority); builder.append(requester, story.requester); builder.append(requirementKind, story.requirementKind); return builder.isEquals(); }/* w ww . ja v a 2 s . com*/ return false; }
From source file:com.norconex.committer.core.AbstractBatchCommitter.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }/*www . j a va 2 s .c om*/ if (obj == null) { return false; } if (!(obj instanceof AbstractBatchCommitter)) { return false; } AbstractBatchCommitter other = (AbstractBatchCommitter) obj; EqualsBuilder equalsBuilder = new EqualsBuilder(); equalsBuilder.appendSuper(super.equals(other)); equalsBuilder.append(commitBatchSize, other.commitBatchSize); equalsBuilder.append(maxRetries, other.maxRetries); equalsBuilder.append(maxRetryWait, other.maxRetryWait); equalsBuilder.append(operations, other.operations); return equalsBuilder.isEquals(); }
From source file:com.nmote.smpp.DataSmPDU.java
/** * Checks if <code>o</code> and this object are equal. * * @return true if objects are equal, false otherwise *//*from w w w.j a va 2s .co m*/ public boolean equals(Object o) { boolean result; if (o instanceof DataSmPDU) { DataSmPDU p = (DataSmPDU) o; EqualsBuilder b = new EqualsBuilder(); b.append(p.getSequence(), getSequence()); b.append(p.getStatus(), getStatus()); // Appending mandatory parameters b.append(p.service_type, service_type); b.append(p.source_addr, source_addr); b.append(p.dest_addr, dest_addr); b.append(p.esm_class, esm_class); b.append(p.registered_delivery, registered_delivery); b.append(p.data_coding, data_coding); // Appending optional parameters b.append(p.getParameters(), getParameters()); result = b.isEquals(); } else { result = false; } return result; }
From source file:com.silverpeas.gallery.web.AlbumEntityMatcher.java
@SuppressWarnings("unchecked") @Override/*from w w w . java 2 s.co m*/ public boolean matches(final Object item) { boolean match = false; if (item instanceof LinkedHashMap) { final AlbumEntity actual = from((LinkedHashMap<String, Object>) item); final EqualsBuilder matcher = new EqualsBuilder(); matcher.appendSuper(actual.getURI().toString().endsWith("/gallery/componentName5/albums/3")); matcher.appendSuper(actual.getParentURI().toString().endsWith("/gallery/componentName5/albums/0")); matcher.append(String.valueOf(expected.getId()), actual.getId()); matcher.append(expected.getName(), actual.getTitle()); matcher.append(expected.getDescription(), actual.getDescription()); matcher.append(4, actual.getMediaList().size()); Set<String> keySet = actual.getMediaList().keySet(); matcher.appendSuper(keySet.contains(PHOTO_ID)); matcher.appendSuper(keySet.contains(VIDEO_ID)); matcher.appendSuper(keySet.contains(SOUND_ID)); matcher.appendSuper(keySet.contains(STREAMING_ID)); match = matcher.isEquals(); } return match; }
From source file:com.nmote.smpp.ReplaceSmPDU.java
/** * Checks if <code>o</code> and this object are equal. * * @return true if objects are equal, false otherwise *///from ww w. j a v a 2 s. co m public boolean equals(Object o) { boolean result; if (o instanceof ReplaceSmPDU) { ReplaceSmPDU p = (ReplaceSmPDU) o; EqualsBuilder b = new EqualsBuilder(); b.append(p.getSequence(), getSequence()); b.append(p.getStatus(), getStatus()); // Appending mandatory parameters b.append(p.message_id, message_id); b.append(p.source_addr, source_addr); b.append(p.schedule_delivery_time, schedule_delivery_time); b.append(p.validity_period, validity_period); b.append(p.registered_delivery, registered_delivery); b.append(p.sm_default_msg_id, sm_default_msg_id); b.append(p.short_message, short_message); // Appending optional parameters b.append(p.getParameters(), getParameters()); result = b.isEquals(); } else { result = false; } return result; }
From source file:de.bstreit.java.oscr.business.base.persistence.AbstractPersistentObjectWithContinuance.java
private boolean performEquals(SUB_TYPE_IMPL_ADD_EQUALS_HASHCODE obj) { final EqualsBuilder equalsBuilder = new EqualsBuilder(); final AbstractPersistentObjectWithContinuance<?> objSuper = obj; equalsBuilder.append(validFrom, objSuper.validFrom); additionalEqualsForSubclasses(equalsBuilder, obj); return equalsBuilder.build(); }
From source file:com.nmote.smpp.SMPPAddress.java
/** * Checks if o and this object are equal. * * @param o/*from ww w . j a va 2 s . c o m*/ * object to test * @return true if objects are equal, false otherwise */ @Override public boolean equals(Object o) { boolean result; if (o instanceof SMPPAddress) { SMPPAddress a = (SMPPAddress) o; EqualsBuilder b = new EqualsBuilder(); b.append(a.getTon(), getTon()); b.append(a.getNpi(), getNpi()); b.append(a.getAddress(), getAddress()); result = b.isEquals(); } else { result = false; } return result; }