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.javaetmoi.core.persistence.hibernate.domain.Country.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }//from   w  ww  .  j  a v  a 2s  . c  o  m
    if (obj == null) {
        return false;
    }
    if (!Country.class.isAssignableFrom(obj.getClass())) {
        return false;
    }

    Country other = (Country) obj;

    return new EqualsBuilder().append(id, other.id).append(this.name, other.name).isEquals();
}

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

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

    if (obj == null || getClass() != obj.getClass())
        return false;

    SwitchMapEntryTemplate that = (SwitchMapEntryTemplate) obj;

    return new EqualsBuilder().append(logicalLocation, that.logicalLocation)
            .append(permittedSwitchTypeUri, that.permittedSwitchTypeUri).isEquals();
}

From source file:io.github.carlomicieli.footballdb.starter.domain.StatValue.java

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

    StatValue that = (StatValue) obj;/*from  ww  w  . j  ava  2  s.co m*/
    return new EqualsBuilder().append(this.groupName, that.groupName).append(this.name, that.name)
            .append(this.value, that.value).isEquals();
}

From source file:com.omertron.themoviedbapi.model.ProductionCountry.java

@Override
public boolean equals(Object obj) {
    if (obj instanceof ProductionCountry) {
        final ProductionCountry other = (ProductionCountry) obj;
        return new EqualsBuilder().append(name, other.name).append(isoCode, other.isoCode).isEquals();
    } else {/*from ww  w .j a v a  2 s.co  m*/
        return false;
    }
}

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

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

    ValidationError rhs = (ValidationError) obj;
    return new EqualsBuilder().append(getErrorAreas(), rhs.getErrorAreas()).append(messages, rhs.messages)
            .isEquals();/*from w w  w .j  av  a2 s.  com*/
}

From source file:com.hp.ov.sdk.dto.generated.Bandwidth.java

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

    if (obj instanceof Bandwidth) {
        Bandwidth bandwidth = (Bandwidth) obj;

        return new EqualsBuilder().append(maximumBandwidth, bandwidth.maximumBandwidth)
                .append(typicalBandwidth, bandwidth.typicalBandwidth).isEquals();
    }/*from   w  ww  .jav  a2 s. c  om*/
    return false;
}

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

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

    if (obj == null || getClass() != obj.getClass())
        return false;

    BootSettingsTemplate that = (BootSettingsTemplate) obj;

    return new EqualsBuilder().append(manageBoot, that.manageBoot).append(order, that.order).isEquals();
}

From source file:io.cloudslang.lang.tools.build.tester.parallel.testcaseevents.FailedSlangTestCaseEvent.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//from ww  w  . j a  v a2s.  co m
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    FailedSlangTestCaseEvent rhs = (FailedSlangTestCaseEvent) obj;
    return new EqualsBuilder().appendSuper(super.equals(obj)).append(this.failureReason, rhs.failureReason)
            .append(this.failureException, rhs.failureException).isEquals();
}

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

@Override
protected boolean subclassEquals(PathAttribute obj) {
    OriginatorIDPathAttribute o = (OriginatorIDPathAttribute) obj;

    return (new EqualsBuilder()).append(getOriginatorID(), o.getOriginatorID()).isEquals();
}

From source file:it.jaschke.alexandria.model.domain.Author.java

@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }//from   ww w. j  a  v  a2 s . c om
    if (!(obj instanceof Author)) {
        return false;
    }
    Author that = ((Author) obj);
    return new EqualsBuilder().append(this.mId, that.mId).append(this.mName, that.mName).isEquals();
}