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:org.jboss.arquillian.model.testSuite.Mask.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//from  w ww .  j a  v  a  2s.c  om
    if (getClass() != obj.getClass()) {
        return false;
    }
    final Mask mask = (Mask) obj;
    EqualsBuilder equalsBuilder = new EqualsBuilder();
    equalsBuilder.append(this.width, mask.width);
    equalsBuilder.append(this.height, mask.height);
    equalsBuilder.append(this.left, mask.left);
    equalsBuilder.append(this.top, mask.top);
    equalsBuilder.append(this.getPattern(), mask.getPattern());
    return equalsBuilder.isEquals();

}

From source file:org.jlgranda.fede.model.sales.Detail.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }/*  w w  w  . jav  a  2  s. c  o m*/
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    Detail other = (Detail) obj;
    EqualsBuilder eb = new EqualsBuilder();

    if (other.getProduct() != null) {
        eb.append(getProductId(), other.getProductId()).append(getProduct(), other.getProduct())
                .append(getInvoice(), other.getInvoice());
    } else {
        eb.append(getProductId(), other.getProductId()).append(getInvoice(), other.getInvoice());

    }
    return eb.isEquals();
}

From source file:org.jlgranda.fede.model.sales.Payment.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }/*w  w w .ja  v a 2  s.  c o  m*/
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    Payment other = (Payment) obj;
    EqualsBuilder eb = new EqualsBuilder();

    eb.append(getId(), other.getId()).append(getInvoice(), other.getInvoice());
    return eb.isEquals();
}

From source file:org.jspresso.framework.application.model.BeanModule.java

/**
 * Equality based on projected object.// w  w  w .  j a  v a 2s .  c o m
 * <p>
 * {@inheritDoc}
 */
@Override
public boolean equals(Object obj) {
    if (!(obj instanceof BeanModule)) {
        return false;
    }
    if (this == obj) {
        return true;
    }
    BeanModule rhs = (BeanModule) obj;
    EqualsBuilder equalsBuilder = new EqualsBuilder().appendSuper(super.equals(obj));
    if (moduleObject != null) {
        equalsBuilder.append(moduleObject, rhs.moduleObject);
    }
    return equalsBuilder.isEquals();
}

From source file:org.jspresso.framework.application.model.Module.java

/**
 * Equality based on projected object./*  w  w  w .  j a  va 2 s .co  m*/
 * <p/>
 * {@inheritDoc}
 */
@Override
public boolean equals(Object obj) {
    if (!(obj instanceof Module)) {
        return false;
    }
    if (this == obj) {
        return true;
    }
    Module rhs = (Module) obj;
    EqualsBuilder equalsBuilder = new EqualsBuilder();
    if (name != null) {
        equalsBuilder.append(name, rhs.name);
    }
    if (i18nName != null) {
        equalsBuilder.append(i18nName, rhs.i18nName);
    }
    if (projectedViewDescriptor != null) {
        equalsBuilder.append(projectedViewDescriptor, rhs.projectedViewDescriptor);
    }
    return equalsBuilder.isEquals();
}

From source file:org.kalypso.contribs.eclipse.ui.pager.AbstractElementPage.java

@Override
public final boolean equals(final Object obj) {
    if (obj instanceof IElementPage) {
        final IElementPage other = (IElementPage) obj;
        final EqualsBuilder builder = new EqualsBuilder();
        builder.append(getIdentifier(), other.getIdentifier());

        return builder.isEquals();
    }/*  w  ww  .  j  a v a2  s. c o m*/

    // TODO Auto-generated method stub
    return super.equals(obj);
}

From source file:org.kalypso.model.hydrology.binding.model.channels.helper.WvqRelationshipRow.java

/**
 * @see java.lang.Object#equals(java.lang.Object)
 *///  w ww. j  a v  a  2 s .  c  om
@Override
public boolean equals(final Object obj) {
    if (obj instanceof WvqRelationshipRow) {
        final WvqRelationshipRow other = (WvqRelationshipRow) obj;

        final EqualsBuilder builder = new EqualsBuilder();
        builder.append(m_waterLevel, other.getWaterLevel());

        return builder.isEquals();
    }
    return super.equals(obj);
}

From source file:org.kalypso.model.hydrology.binding.model.nodes.helper.QqRelationRow.java

/**
 * @see java.lang.Object#equals(java.lang.Object)
 *///from www . j a  va 2 s . c  o m
@Override
public boolean equals(final Object obj) {
    if (obj instanceof QqRelationRow) {
        final QqRelationRow other = (QqRelationRow) obj;

        final EqualsBuilder builder = new EqualsBuilder();
        builder.append(getDischarge(), other.getDischarge());

        return builder.isEquals();
    }
    return super.equals(obj);
}

From source file:org.kalypso.model.wspm.core.profil.wrappers.ProfileWrapper.java

@Override
public boolean equals(final Object obj) {
    if (obj instanceof ProfileWrapper) {
        final ProfileWrapper other = (ProfileWrapper) obj;

        final String station = String.format("%.3f", getStation()); //$NON-NLS-1$
        final String otherStation = String.format("%.3f", other.getStation()); //$NON-NLS-1$

        final EqualsBuilder builder = new EqualsBuilder();
        builder.append(station, otherStation);

        return builder.isEquals();
    }/*from   w w w  .  java2  s .c  o m*/

    return super.equals(obj);
}

From source file:org.kalypso.model.wspm.ewawi.utils.EwawiKey.java

@Override
public boolean equals(final Object obj) {
    if (!(obj instanceof EwawiKey))
        return false;

    final EwawiKey other = (EwawiKey) obj;

    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(m_pe, other.getPe());
    builder.append(m_alias, other.getAlias());
    builder.append(m_modelId, other.getModelId());
    builder.append(m_freeText, other.getFreeText());

    return builder.isEquals();
}