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.nexmo.client.voice.PhoneEndpoint.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }/*w  w  w .  j a  v a  2 s. co m*/
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    PhoneEndpoint rhs = (PhoneEndpoint) obj;
    return new EqualsBuilder().append(this.type, rhs.type).append(this.number, rhs.number)
            .append(this.dtmfAnswer, rhs.dtmfAnswer).isEquals();
}

From source file:com.sonicle.webtop.core.bol.ORolePermission.java

@Override
public boolean equals(Object obj) {
    if (obj instanceof ORolePermission == false)
        return false;
    if (this == obj)
        return true;
    final ORolePermission otherObject = (ORolePermission) obj;
    return new EqualsBuilder().append(getRolePermissionId(), otherObject.getRolePermissionId()).isEquals();
}

From source file:com.anrisoftware.sscontrol.dhclient.statements.Declaration.java

/**
 * Compare this declaration with the specified declaration or a string.
 *//*w ww.  j  a  v a 2s . co m*/
@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }
    if (obj == this) {
        return true;
    }
    if (obj instanceof String) {
        String decl = (String) obj;
        return declaration.equals(decl);
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    Declaration rhs = (Declaration) obj;
    return new EqualsBuilder().append(declaration, rhs.getDeclaration()).isEquals();

}

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

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

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

    SnmpConfiguration that = (SnmpConfiguration) obj;

    return new EqualsBuilder().appendSuper(super.equals(obj)).append(readCommunity, that.readCommunity)
            .append(systemContact, that.systemContact).append(trapDestinations, that.trapDestinations)
            .append(snmpAccess, that.snmpAccess).append(enabled, that.enabled).isEquals();
}

From source file:com.nesscomputing.lifecycle.LifecycleStage.java

@Override
public boolean equals(final Object other) {
    if (!(other instanceof LifecycleStage)) {
        return false;
    }// w w w .ja va 2  s .co  m
    final LifecycleStage castOther = (LifecycleStage) other;
    return new EqualsBuilder().append(name, castOther.name).isEquals();
}

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

@Override
public boolean equals(final Object other) {
    if (other == this) {
        return true;
    }/*from   www .  ja va  2  s.co  m*/
    if ((other instanceof QosClassificationMapping) == false) {
        return false;
    }
    final QosClassificationMapping rhs = ((QosClassificationMapping) other);
    return new EqualsBuilder().append(dot1pClassMapping, rhs.dot1pClassMapping)
            .append(dscpClassMapping, rhs.dscpClassMapping).isEquals();
}

From source file:com.hypersocket.repository.AbstractEntity.java

@Override
public boolean equals(Object obj) {

    if (this == obj)
        return true;
    if (obj == null)
        return false;
    if (getClass() != obj.getClass())
        return false;
    @SuppressWarnings("unchecked")
    AbstractEntity<T> other = (AbstractEntity<T>) obj;
    if (getId() == null) {
        if (other.getId() != null)
            return false;
    } else if (!getId().equals(other.getId()))
        return false;

    EqualsBuilder builder = new EqualsBuilder();
    doEqualsOnKeys(builder, obj);//from  w ww.  j  a v  a  2 s. c  o m
    return builder.build();
}

From source file:com.norconex.committer.core.FileDeleteOperation.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }//from w ww  .j  av a 2s.co  m
    if (obj == null) {
        return false;
    }
    if (!(obj instanceof FileDeleteOperation)) {
        return false;
    }
    FileDeleteOperation other = (FileDeleteOperation) obj;
    EqualsBuilder equalsBuilder = new EqualsBuilder();
    equalsBuilder.append(reference, other.reference);
    equalsBuilder.append(refFile, other.refFile);
    return equalsBuilder.isEquals();
}

From source file:ca.mcgill.music.ddmal.mei.MeiNamespace.java

/**
 * Compare this namespace to another object.
 * Two namespaces are equal if their href is the same.
 * Prefixes can be different./* w  w  w.  j a  v a 2s  .  c  om*/
 */
@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    MeiNamespace rhs = (MeiNamespace) obj;
    return new EqualsBuilder().append(href, rhs.href).isEquals();
}

From source file:de.kaiserpfalzEdv.infopir.backend.db.dynamic.Accused.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }/*from   www  .j a va  2s .  c o  m*/
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    Accused rhs = (Accused) obj;
    return new EqualsBuilder().appendSuper(super.equals(obj)).append(this.memberNumber, rhs.getMemberNumber())
            .append(this.surName, rhs.getSurName()).append(this.givenName, rhs.getGivenName()).isEquals();
}