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:mx.com.adolfogarcia.popularmovies.model.domain.Trailer.java

@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }/* w w  w  .j  a  va 2s.co  m*/
    if (!(obj instanceof Trailer)) {
        return false;
    }
    Trailer that = ((Trailer) obj);
    return new EqualsBuilder().append(this.mId, that.mId).append(this.mApiId, that.mApiId)
            .append(this.mName, that.mName).append(this.mVideoUri, that.mVideoUri).isEquals();
}

From source file:ch.aonyx.broker.ib.api.order.NextValidOrderIdRequest.java

@Override
public boolean equals(final Object obj) {
    if (obj == null) {
        return false;
    }/*from  w w w.  j  a  v  a  2 s  .c  o  m*/
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    final NextValidOrderIdRequest rhs = (NextValidOrderIdRequest) obj;
    return new EqualsBuilder().append(suggestedId, rhs.suggestedId).isEquals();
}

From source file:de.blizzy.documentr.page.Page.java

@Override
public boolean equals(Object o) {
    if (o == this) {
        return true;
    } else if ((o != null) && o.getClass().equals(getClass())) {
        Page other = (Page) o;//from   ww  w  .  j  a  v  a  2 s  . co  m
        return new EqualsBuilder().append(parentPagePath, other.parentPagePath).append(title, other.title)
                .append(data, other.data).append(contentType, other.contentType).append(tags, other.tags)
                .append(viewRestrictionRole, other.viewRestrictionRole).isEquals();
    }
    return false;
}

From source file:de.qaware.chronix.solr.query.analysis.functions.aggregations.Avg.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//from  ww  w.j  a v  a  2s.  c om
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    return new EqualsBuilder().isEquals();
}

From source file:com.codspire.mojo.model.ProcessingStatus.java

@Override
public boolean equals(final Object obj) {
    if (obj instanceof ProcessingStatus) {
        final ProcessingStatus other = (ProcessingStatus) obj;
        return new EqualsBuilder().append(artifact, other.artifact).append(sha1, other.sha1).isEquals();
    } else {// ww  w .j  ava 2s  . c o  m
        return false;
    }
}

From source file:com.qccr.livtrip.web.util.Order.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }/*  w  ww .j  a  v a 2s.c  o  m*/
    if (getClass() != obj.getClass()) {
        return false;
    }
    if (this == obj) {
        return true;
    }
    Order other = (Order) obj;
    return new EqualsBuilder().append(getProperty(), other.getProperty())
            .append(getDirection(), other.getDirection()).isEquals();
}

From source file:annis.model.QueryAnnotation.java

@Override
public boolean equals(Object obj) {
    if (obj == null || !(obj instanceof QueryAnnotation))
        return false;

    QueryAnnotation other = (QueryAnnotation) obj;

    return new EqualsBuilder().append(this.namespace, other.namespace).append(this.name, other.name)
            .append(this.value, other.value).append(this.textMatching, other.textMatching).isEquals();
}

From source file:concept.model.Fact.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }//  ww w .  jav  a2  s  . c o m

    if (!(obj instanceof Fact)) {
        return false;
    }

    final Fact other = (Fact) obj;

    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(this.getName(), other.getName());
    builder.append(this.getMatcher(), other.getMatcher());
    return builder.isEquals();
}

From source file:de.qaware.chronix.solr.query.analysis.functions.transformation.Timeshift.java

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

From source file:com.galenframework.suite.actions.GalenPageActionResize.java

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

    return new EqualsBuilder() //@formatter:off
            .append(width, rhs.width).append(height, rhs.height).isEquals(); //@formatter:on
}