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:io.netlibs.bgp.rib.TopologicalTreeSortingKey.java
@Override public boolean equals(Object obj) { if (!(obj instanceof TopologicalTreeSortingKey)) return false; TopologicalTreeSortingKey o = (TopologicalTreeSortingKey) obj; EqualsBuilder builder = (new EqualsBuilder()).append(getAddressFamilyKey(), o.getAddressFamilyKey()) .append(getPathAttributes().size(), o.getPathAttributes().size()); if (builder.isEquals()) { Iterator<PathAttribute> lit = getPathAttributes().iterator(); Iterator<PathAttribute> rit = o.getPathAttributes().iterator(); while (lit.hasNext()) builder.append(lit.next(), rit.next()); }/*from w w w. j a v a2 s. c om*/ return builder.isEquals(); }
From source file:com.nmote.smpp.SubmitMultiPDU.java
/** * Checks if <code>o</code> and this object are equal. * * @return true if objects are equal, false otherwise *//*from w w w.jav a 2s.c o m*/ public boolean equals(Object o) { boolean result; if (o instanceof SubmitMultiPDU) { SubmitMultiPDU p = (SubmitMultiPDU) 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_addresses, dest_addresses); b.append(p.esm_class, esm_class); b.append(p.protocol_id, protocol_id); b.append(p.priority_flag, priority_flag); 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.replace_if_present_flag, replace_if_present_flag); b.append(p.data_coding, data_coding); 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:com.nmote.smpp.DeliverSmPDU.java
/** * Checks if <code>o</code> and this object are equal. * * @return true if objects are equal, false otherwise *//*from www . j av a 2 s . c o m*/ public boolean equals(Object o) { boolean result; if (o instanceof DeliverSmPDU) { DeliverSmPDU p = (DeliverSmPDU) 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.protocol_id, protocol_id); b.append(p.priority_flag, priority_flag); 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.replace_if_present_flag, replace_if_present_flag); b.append(p.data_coding, data_coding); 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:com.nmote.smpp.SubmitSmPDU.java
/** * Checks if <code>o</code> and this object are equal. * * @return true if objects are equal, false otherwise */// w ww . j a va 2s .c o m public boolean equals(Object o) { boolean result; if (o instanceof SubmitSmPDU) { SubmitSmPDU p = (SubmitSmPDU) 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.protocol_id, protocol_id); b.append(p.priority_flag, priority_flag); 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.replace_if_present_flag, replace_if_present_flag); b.append(p.data_coding, data_coding); 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:com.capitalone.dashboard.model.Feature.java
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Feature that = (Feature) o;/*from w w w. j ava 2s . c o m*/ EqualsBuilder builder = new EqualsBuilder(); return builder.append(collectorId, that.collectorId).append(sId, that.sId).build(); }
From source file:com.feilong.taglib.display.httpconcat.command.HttpConcatParam.java
@Override public boolean equals(Object obj) { if (obj == null) { return false; }/*from w ww. j av a2 s. c om*/ if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } //????reflectionEqualsAccessibleObject.setAccessible??? //????? // //EqualsBuilder.reflectionEquals(this, obj); HttpConcatParam t = (HttpConcatParam) obj; EqualsBuilder equalsBuilder = new EqualsBuilder(); String[] itemSrcArray = null; if (null != this.itemSrcList) { itemSrcArray = CollectionsUtil.toArray(this.itemSrcList); } String[] itemSrcArray2 = null; if (null != t.getItemSrcList()) { itemSrcArray2 = CollectionsUtil.toArray(t.getItemSrcList()); } return equalsBuilder // //.appendSuper(super.equals(obj))// .append(this.domain, t.getDomain())// .append(this.httpConcatSupport, t.getHttpConcatSupport())// .append(this.root, t.getRoot())// .append(this.type, t.getType())// .append(this.version, t.getVersion())// .append(itemSrcArray, itemSrcArray2)// .isEquals(); }
From source file:io.netlibs.bgp.rib.Route.java
public boolean networkEquals(Route o) { EqualsBuilder builder = (new EqualsBuilder()).append(getAddressFamilyKey(), o.getAddressFamilyKey()) .append(getNlri(), o.getNlri()).append(getPathAttributes().size(), o.getPathAttributes().size()) .append(getNextHop(), o.getNextHop()); if (builder.isEquals()) { Iterator<PathAttribute> lit = getPathAttributes().iterator(); Iterator<PathAttribute> rit = o.getPathAttributes().iterator(); while (lit.hasNext()) builder.append(lit.next(), rit.next()); }/* ww w . j a va2 s .co m*/ return builder.isEquals(); }
From source file:io.netlibs.bgp.protocol.attributes.MultiProtocolUnreachableNLRI.java
@Override protected boolean subclassEquals(final PathAttribute obj) { final MultiProtocolUnreachableNLRI o = (MultiProtocolUnreachableNLRI) obj; final EqualsBuilder builer = (new EqualsBuilder()).append(this.getAddressFamily(), o.getAddressFamily()) .append(this.getSubsequentAddressFamily(), o.getSubsequentAddressFamily()) .append(this.getNlris().size(), o.getNlris().size()); if (builer.isEquals()) { final Iterator<NetworkLayerReachabilityInformation> lit = this.getNlris().iterator(); final Iterator<NetworkLayerReachabilityInformation> rit = o.getNlris().iterator(); while (lit.hasNext()) { builer.append(lit.next(), rit.next()); }//from ww w . jav a 2s.c o m } return builer.isEquals(); }
From source file:io.netlibs.bgp.rib.Route.java
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Route o = (Route) obj;//from w w w.ja v a 2s . c om EqualsBuilder builder = (new EqualsBuilder()).append(getAddressFamilyKey(), o.getAddressFamilyKey()) .append(getNlri(), o.getNlri()).append(getPathAttributes().size(), o.getPathAttributes().size()) .append(getNextHop(), o.getNextHop()).append(getRibID(), o.getRibID()); if (builder.isEquals()) { Iterator<PathAttribute> lit = getPathAttributes().iterator(); Iterator<PathAttribute> rit = o.getPathAttributes().iterator(); while (lit.hasNext()) builder.append(lit.next(), rit.next()); } return builder.isEquals(); }
From source file:io.netlibs.bgp.protocol.attributes.MultiProtocolReachableNLRI.java
@Override protected boolean subclassEquals(final PathAttribute obj) { final MultiProtocolReachableNLRI o = (MultiProtocolReachableNLRI) obj; final EqualsBuilder builer = (new EqualsBuilder()).append(this.getAddressFamily(), o.getAddressFamily()) .append(this.getSubsequentAddressFamily(), o.getSubsequentAddressFamily()) .append(this.getNextHop(), o.getNextHop()).append(this.getNlris().size(), o.getNlris().size()); if (builer.isEquals()) { final Iterator<NetworkLayerReachabilityInformation> lit = this.getNlris().iterator(); final Iterator<NetworkLayerReachabilityInformation> rit = o.getNlris().iterator(); while (lit.hasNext()) { builer.append(lit.next(), rit.next()); }/* w w w . j a va2 s . c o m*/ } return builer.isEquals(); }