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

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

Introduction

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

Prototype

public EqualsBuilder() 

Source Link

Document

Constructor for EqualsBuilder.

Starts off assuming that equals is true.

Usage

From source file:com.anrisoftware.prefdialog.fields.FieldInfo.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }// ww  w  .  j a  v a 2s .com
    if (obj == this) {
        return true;
    }
    if (obj instanceof FieldInfo) {
        FieldInfo rhs = (FieldInfo) obj;
        return new EqualsBuilder().append(getAnnotationType(), rhs.getAnnotationType()).equals(obj);
    }

    return false;
}

From source file:com.bahadirakin.model.AbstractEntity.java

@Override
public final boolean equals(Object obj) {

    if (this == obj) {
        return true;
    }/*  w ww .  j  ava  2s. co m*/

    // isNew ???
    if (isNew() || null == obj) {
        return false;
    }

    if (getClass().equals(obj.getClass())) {
        IEntity entity = (IEntity) obj;
        return new EqualsBuilder().append(getId(), entity.getId()).isEquals();
    }

    return false;
}

From source file:com.hp.ov.sdk.dto.EndpointsCsvFileResponse.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;

    if (o instanceof EndpointsCsvFileResponse) {
        EndpointsCsvFileResponse that = (EndpointsCsvFileResponse) o;

        return new EqualsBuilder().append(category, that.category).append(created, that.created)
                .append(csvFileName, that.csvFileName).append(eTag, that.eTag).append(modified, that.modified)
                .append(type, that.type).append(uri, that.uri).isEquals();
    }/* w  ww  .  j  a  v  a 2 s.  c  om*/
    return false;
}

From source file:com.galenframework.ide.devices.commands.DeviceResizeCommand.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    } else if (obj == this) {
        return true;
    } else if (!(obj instanceof DeviceResizeCommand)) {
        return false;
    } else {//from  w ww  .java 2 s  .  c  o m
        DeviceResizeCommand rhs = (DeviceResizeCommand) obj;
        return new EqualsBuilder().append(rhs.getCommandId(), this.getCommandId()).append(rhs.width, this.width)
                .append(rhs.height, this.height).isEquals();
    }
}

From source file:com.galenframework.ide.devices.commands.DeviceInjectCommand.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    } else if (obj == this) {
        return true;
    } else if (!(obj instanceof DeviceInjectCommand)) {
        return false;
    } else {/*w  ww  .java  2  s  . co  m*/
        DeviceInjectCommand rhs = (DeviceInjectCommand) obj;
        return new EqualsBuilder().append(rhs.getCommandId(), this.getCommandId())
                .append(rhs.script, this.script).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   ww w  .j a  va2s .c  o  m

    return builder.isEquals();
}

From source file:com.qcadoo.mes.deviationCausesReporting.domain.DeviationWithOccurrencesCount.java

@Override
public boolean equals(final Object obj) {
    if (obj == null) {
        return false;
    }//from   ww w  .j a v  a 2 s  .com
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    DeviationWithOccurrencesCount rhs = (DeviationWithOccurrencesCount) obj;
    return new EqualsBuilder().append(this.deviationCause, rhs.deviationCause)
            .append(this.totalNumberOfOccurrences, rhs.totalNumberOfOccurrences).isEquals();
}

From source file:com.textocat.textokit.eval.matching.FSFeatureMatcher.java

@Override
public boolean equals(Object obj) {
    if (!(obj instanceof FSFeatureMatcher)) {
        return false;
    }//from   www  .  j a  va2 s  . com
    FSFeatureMatcher<?, ?> that = (FSFeatureMatcher<?, ?>) obj;
    return new EqualsBuilder().append(this.feature, that.feature).append(this.valueMatcher, that.valueMatcher)
            .isEquals();
}

From source file:com.galenframework.reports.TestStatistic.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//  w  ww. ja  va2  s .co m
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof TestStatistic)) {
        return false;
    }

    TestStatistic rhs = (TestStatistic) obj;
    return new EqualsBuilder().append(this.passed, rhs.passed).append(this.errors, rhs.errors)
            .append(this.warnings, rhs.warnings).append(this.total, rhs.total).isEquals();
}

From source file:com.github.carlomicieli.nerdmovies.models.Comment.java

@Override
public boolean equals(Object obj) {
    if (obj == this)
        return true;
    if (!(obj instanceof Comment))
        return false;

    Comment other = (Comment) obj;
    return new EqualsBuilder().append(author, other.author).append(content, other.content)
            .append(postedAt, other.postedAt).isEquals();
}