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:ch.sentric.QueryKeyValuePair.java

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

    final QueryKeyValuePair rhs = (QueryKeyValuePair) obj;
    return new EqualsBuilder().append(getKey(), rhs.getKey()).append(getValue(), rhs.getValue()).isEquals();
}

From source file:com.galenframework.rainbow4j.colorscheme.SimpleColorClassifier.java

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

    SimpleColorClassifier rhs = (SimpleColorClassifier) obj;
    return new EqualsBuilder().append(rhs.red, this.red).append(rhs.blue, this.blue)
            .append(rhs.green, this.green).append(rhs.name, this.name).isEquals();
}

From source file:io.netlibs.bgp.rib.RouteAdded.java

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

    RouteAdded other = (RouteAdded) obj;

    return (new EqualsBuilder()).append(getPeerName(), other.getPeerName()).append(getSide(), other.getSide())
            .append(getRoute(), other.getRoute()).isEquals();
}

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

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

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

    LocationEntry that = (LocationEntry) obj;

    return new EqualsBuilder().append(relativeValue, that.relativeValue).append(value, that.value)
            .append(type, that.type).isEquals();
}

From source file:com.antonjohansson.elasticsearchshell.session.Session.java

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

    Session that = (Session) obj;
    return new EqualsBuilder().append(this.name, that.name).append(this.connection, that.connection)
            .append(this.currentIndex, that.currentIndex).isEquals();
}

From source file:de.blizzy.documentr.access.PermissionGrantedAuthority.java

@Override
public boolean equals(Object o) {
    if (o == this) {
        return true;
    } else if ((o != null) && o.getClass().equals(getClass())) {
        PermissionGrantedAuthority other = (PermissionGrantedAuthority) o;
        return new EqualsBuilder().append(other.target, target).append(other.permission, permission).isEquals();
    }/*from w  w  w  . j av  a2 s  .  c  o m*/
    return false;
}

From source file:com.omertron.thetvdbapi.model.Language.java

@Override
public boolean equals(Object obj) {
    if (obj instanceof Language) {
        final Language other = (Language) obj;
        return new EqualsBuilder().append(id, other.id).append(name, other.name)
                .append(abbreviation, other.abbreviation).isEquals();
    } else {//w ww  .j a  v a 2  s .c o m
        return false;
    }
}

From source file:io.cloudslang.lang.entities.MapForLoopStatement.java

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

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

    MapForLoopStatement that = (MapForLoopStatement) o;

    return new EqualsBuilder().appendSuper(super.equals(o)).append(keyName, that.keyName)
            .append(valueName, that.valueName).isEquals();
}

From source file:com.qcadoo.mes.orders.constants.deviationReasonTypes.DeviationModelDescriber.java

@Override
public boolean equals(final Object obj) {
    if (obj == null) {
        return false;
    }// w  w w .  ja  v  a  2 s .  c o  m
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    DeviationModelDescriber rhs = (DeviationModelDescriber) obj;
    return new EqualsBuilder().append(this.modelPlugin, rhs.modelPlugin).append(this.modelName, rhs.modelName)
            .append(this.reasonTypeFieldName, rhs.reasonTypeFieldName).isEquals();
}

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

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

    if (obj instanceof NetworkResponse) {
        NetworkResponse that = (NetworkResponse) obj;

        return new EqualsBuilder().append(interconnectUri, that.interconnectUri).append(name, that.name)
                .append(networkType, that.networkType).append(uri, that.uri).isEquals();
    }/*from  w ww.  j a v  a 2s . c o m*/
    return false;
}