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.jaspersoft.jasperserver.jaxrs.poc.hypermedia.content.dto.ContentReference.java

@Override
public boolean equals(Object obj) {
    if (obj == null || !(obj instanceof ContentReference)) {
        return false;
    }//from w  ww. jav  a2s  . c om
    ContentReference that = (ContentReference) obj;
    return new EqualsBuilder().append(this.getId(), that.getId())
            .append(this.getDescription(), that.getDescription()).append(this.getUrl(), that.getUrl())
            .append(this.getTitle(), that.getTitle()).append(this.getGroup(), that.getGroup()).isEquals();
}

From source file:net.mindengine.galen.validation.ValidationResult.java

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

    ValidationResult rhs = (ValidationResult) obj;
    return new EqualsBuilder() //@formatter:off
            .append(this.error, rhs.error).append(this.validationObjects, rhs.validationObjects).isEquals(); //@formatter:on

}

From source file:com.nesscomputing.mojo.numbers.beans.MacroDefinition.java

@Override
public boolean equals(final Object other) {
    if (!(other instanceof MacroDefinition)) {
        return false;
    }//from www .j  av  a2 s .co m
    MacroDefinition castOther = (MacroDefinition) other;
    return new EqualsBuilder().append(macroType, castOther.macroType).append(macroClass, castOther.macroClass)
            .append(properties, castOther.properties).isEquals();
}

From source file:com.norconex.commons.lang.map.MapChangeEvent.java

@Override
public boolean equals(final Object other) {
    if (!(other instanceof MapChangeEvent)) {
        return false;
    }/* w ww.j  a  va2s.  c  o  m*/
    MapChangeEvent<?, ?> castOther = (MapChangeEvent<?, ?>) other;
    return new EqualsBuilder().append(source, castOther.source).append(key, castOther.key)
            .append(oldValue, castOther.oldValue).append(newValue, castOther.newValue).isEquals();
}

From source file:com.deegeu.facebook.messenger.model.receive.Postback.java

@Override
public boolean equals(Object other) {
    if (other == this) {
        return true;
    }/*from www.j  ava 2s  . c  o m*/
    if ((other instanceof Postback) == false) {
        return false;
    }
    Postback rhs = ((Postback) other);
    return new EqualsBuilder().append(payload, rhs.payload).append(referral, rhs.referral).isEquals();
}

From source file:com.esofthead.mycollab.module.crm.domain.CampaignAccount.java

public final boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//w ww  .  java  2s. c om
    if (obj == this) {
        return true;
    }
    if (!obj.getClass().isAssignableFrom(getClass())) {
        return false;
    }
    CampaignAccount item = (CampaignAccount) obj;
    return new EqualsBuilder().append(id, item.id).build();
}

From source file:com.esofthead.mycollab.module.crm.domain.CampaignContact.java

public final boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }/*from w ww . j  av a 2s. c om*/
    if (obj == this) {
        return true;
    }
    if (!obj.getClass().isAssignableFrom(getClass())) {
        return false;
    }
    CampaignContact item = (CampaignContact) obj;
    return new EqualsBuilder().append(id, item.id).build();
}

From source file:com.jdom.get.stuff.done.domain.DueWithinDatesFilterOption.java

@Override
public boolean equals(Object obj) {
    if (obj instanceof DueWithinDatesFilterOption) {
        DueWithinDatesFilterOption other = (DueWithinDatesFilterOption) obj;
        EqualsBuilder eqBuilder = new EqualsBuilder();
        eqBuilder.append(this.earliest, other.earliest);
        eqBuilder.append(this.latest, other.latest);

        return eqBuilder.isEquals();
    }/*www  .  ja v  a2s .  c  o  m*/
    return false;
}

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

@Override
public boolean equals(Object obj) {
    if (obj instanceof Iteration) {
        Iteration plan = (Iteration) obj;
        EqualsBuilder builder = new EqualsBuilder();
        builder.append(iterationBacklog, plan.iterationBacklog);

        return builder.isEquals() && super.equals(obj);
    }//from  w w  w.  j  av  a 2  s  .com

    return false;
}