Example usage for org.apache.commons.lang3.builder EqualsBuilder append

List of usage examples for org.apache.commons.lang3.builder EqualsBuilder append

Introduction

In this page you can find the example usage for org.apache.commons.lang3.builder EqualsBuilder append.

Prototype

public EqualsBuilder append(final boolean[] lhs, final boolean[] rhs) 

Source Link

Document

Deep comparison of array of boolean.

Usage

From source file:com.nmote.smpp.DataSmRespPDU.java

/**
 * Checks if <code>o</code> and this object are equal.
 *
 * @return true if objects are equal, false otherwise
 *///w ww .j  a  v a2 s  .co m
public boolean equals(Object o) {
    boolean result;
    if (o instanceof DataSmRespPDU) {
        DataSmRespPDU p = (DataSmRespPDU) 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);

        // Appending optional parameters
        b.append(p.getParameters(), getParameters());

        result = b.isEquals();
    } else {
        result = false;
    }

    return result;
}

From source file:com.nmote.smpp.DeliverSmRespPDU.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  .  c  om*/
public boolean equals(Object o) {
    boolean result;
    if (o instanceof DeliverSmRespPDU) {
        DeliverSmRespPDU p = (DeliverSmRespPDU) 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);

        // Appending optional parameters
        b.append(p.getParameters(), getParameters());

        result = b.isEquals();
    } else {
        result = false;
    }

    return result;
}

From source file:com.nmote.smpp.SubmitSmRespPDU.java

/**
 * Checks if <code>o</code> and this object are equal.
 *
 * @return true if objects are equal, false otherwise
 *//*from w  w  w .  jav  a2s .  c  o m*/
public boolean equals(Object o) {
    boolean result;
    if (o instanceof SubmitSmRespPDU) {
        SubmitSmRespPDU p = (SubmitSmRespPDU) 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);

        // Appending optional parameters
        b.append(p.getParameters(), getParameters());

        result = b.isEquals();
    } else {
        result = false;
    }

    return result;
}

From source file:com.github.jgility.core.planning.AbstractPlan.java

@Override
public boolean equals(Object obj) {
    if (obj instanceof AbstractPlan) {
        AbstractPlan plan = (AbstractPlan) obj;
        EqualsBuilder builder = new EqualsBuilder();
        builder.append(start, plan.getStart());
        builder.append(end, plan.getEnd());
        return builder.isEquals();
    }/*from www. j  a va 2s.co m*/
    return false;
}

From source file:com.nmote.smpp.BroadcastSmRespPDU.java

/**
 * Checks if <code>o</code> and this object are equal.
 *
 * @return true if objects are equal, false otherwise
 */// w w w . ja va  2s  . co  m
public boolean equals(Object o) {
    boolean result;
    if (o instanceof BroadcastSmRespPDU) {
        BroadcastSmRespPDU p = (BroadcastSmRespPDU) 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);

        // Appending optional parameters
        b.append(p.getParameters(), getParameters());

        result = b.isEquals();
    } else {
        result = false;
    }

    return result;
}

From source file:com.nmote.smpp.QueryBroadcastSmRespPDU.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 2s  . c  o  m*/
public boolean equals(Object o) {
    boolean result;
    if (o instanceof QueryBroadcastSmRespPDU) {
        QueryBroadcastSmRespPDU p = (QueryBroadcastSmRespPDU) 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);

        // Appending optional parameters
        b.append(p.getParameters(), getParameters());

        result = b.isEquals();
    } else {
        result = false;
    }

    return result;
}

From source file:net.sf.dynamicreports.design.base.style.DRDesignConditionalStyle.java

@Override
public boolean equals(Object obj) {
    EqualsBuilder equalsBuilder = new EqualsBuilder().appendSuper(super.equals(obj));
    if (equalsBuilder.isEquals()) {
        DRDesignConditionalStyle o = (DRDesignConditionalStyle) obj;
        equalsBuilder.append(conditionExpression, o.conditionExpression).append(dataset, o.dataset);
    }/*w ww  . j  av a  2  s  .  c o  m*/
    return equalsBuilder.isEquals();
}

From source file:de.qaware.chronix.storage.solr.timeseries.metric.MetricTimeSeriesKey.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (o == null || getClass() != o.getClass())
        return false;

    MetricTimeSeriesKey that = (MetricTimeSeriesKey) o;

    EqualsBuilder eb = new EqualsBuilder();
    for (MetricDimension dim : MetricDimension.getIdentityDimensions()) {
        if (dim == MetricDimension.METRIC) {
            eb.append(mts.getMetric(), that.getMetricTimeSeries().getMetric());
        } else {// w  ww .j  a  v a2s. c om
            eb.append(mts.attributes().get(dim), that.getMetricTimeSeries().attributes().get(dim));
        }
    }
    return eb.isEquals();
}

From source file:io.netlibs.bgp.protocol.attributes.ClusterListPathAttribute.java

@Override
protected boolean subclassEquals(PathAttribute obj) {
    EqualsBuilder builder = new EqualsBuilder();
    ClusterListPathAttribute o = (ClusterListPathAttribute) obj;

    builder.append(getClusterIds().size(), o.getClusterIds().size());

    if (builder.isEquals()) {
        Iterator<Integer> lit = getClusterIds().iterator();
        Iterator<Integer> rit = o.getClusterIds().iterator();

        while (lit.hasNext())
            builder.append(lit.next(), rit.next());
    }//from  w w  w  . j av  a 2 s. c o  m

    return builder.isEquals();
}

From source file:com.currencyfair.minfraud.model.RiskScoreRequest.java

@Override
public boolean equals(Object o) {
    if (o == null) {
        return false;
    }//from w  w w . ja va2  s  .  c om
    if (!(o instanceof RiskScoreRequest)) {
        return false;
    }
    RiskScoreRequest rhs = (RiskScoreRequest) o;
    EqualsBuilder b = new EqualsBuilder();
    b.append(ipAddress, rhs.ipAddress);
    b.append(licenseKey, rhs.licenseKey);
    b.append(billingAddress, rhs.billingAddress);
    b.append(shippingAddress, rhs.shippingAddress);
    b.append(userData, rhs.userData);
    b.append(bankIdentity, rhs.bankIdentity);
    b.append(browserIdentity, rhs.browserIdentity);
    b.append(transactionInfo, rhs.transactionInfo);
    b.append(avsResult, rhs.avsResult);
    b.append(cvvResult, rhs.cvvResult);
    b.append(serviceLevel, rhs.serviceLevel);
    b.append(forwardedIp, rhs.forwardedIp);
    return b.isEquals();
}