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:eu.codesketch.adam.rest.domain.model.Registry.java

@Override
public boolean equals(Object obj) {
    if (null == obj) {
        return false;
    }//from  ww  w .  ja  va  2s  .  c o  m
    if (this == obj) {
        return true;
    }
    if (!getClass().equals(obj.getClass())) {
        return false;
    }
    Registry other = (Registry) obj;
    return new EqualsBuilder().append(this.url, other.url).append(this.username, other.username)
            .append(this.password, other.password).append(this.email, other.email).isEquals();
}

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

@Override
public boolean equals(Object o) {
    if (o == this) {
        return true;
    } else if ((o != null) && o.getClass().equals(getClass())) {
        RoleGrantedAuthority other = (RoleGrantedAuthority) o;
        return new EqualsBuilder().append(other.target, target).append(other.roleName, roleName).isEquals();
    }/*from  w  w w .jav a 2s. c  o m*/
    return false;
}

From source file:io.netlibs.bgp.config.nodes.ServerPortConfigurationDecorator.java

/**
 * @return//from  w ww  . ja  v  a  2  s .  c  o m
 * @see io.netlibs.bgp.config.nodes.ServerConfiguration#equals()
 */
public boolean equals(Object other) {
    if (!getClass().equals(other.getClass()))
        return false;

    ServerPortConfigurationDecorator o = (ServerPortConfigurationDecorator) other;

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

From source file:net.sf.dynamicreports.design.base.style.DRDesignTabStop.java

@Override
public boolean equals(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;
    }

    DRDesignTabStop o = (DRDesignTabStop) obj;
    EqualsBuilder equalsBuilder = new EqualsBuilder().append(position, o.position).append(alignment,
            o.alignment);
    return equalsBuilder.isEquals();
}

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

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

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

    LogicalSwitchDomainInfo that = (LogicalSwitchDomainInfo) obj;

    return new EqualsBuilder().append(domainId, that.domainId).append(masterMacAddress, that.masterMacAddress)
            .append(perSwitchDomain, that.perSwitchDomain).isEquals();
}

From source file:io.netlibs.bgp.config.nodes.ClientPortConfigurationDecorator.java

/**
 * @param other/*from  ww w  .jav  a 2 s .c o m*/
 * @return
 * @see io.netlibs.bgp.config.nodes.ClientConfiguration#equals(java.lang.Object)
 */
public boolean equals(Object other) {
    if (!(other instanceof ClientConfiguration))
        return false;

    ClientConfiguration o = (ClientConfiguration) other;
    return (new EqualsBuilder()).append(getRemoteAddress(), o.getRemoteAddress()).isEquals();
}

From source file:net.sf.companymanager.domain.support.AbstractPersistable.java

@Override
public boolean equals(Object obj) {
    if (obj instanceof Persistable) {
        final Persistable other = (Persistable) obj;
        if (!isNew()) {
            return (new EqualsBuilder()).append(getId(), other.getId()).isEquals();
        } else {/*from w w  w  . ja v a2s. c o  m*/
            return EqualsBuilder.reflectionEquals(this, obj);
        }
    } else {
        return false;
    }
}

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

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

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

    BiosSettingsTemplate that = (BiosSettingsTemplate) obj;

    return new EqualsBuilder().append(manageBios, that.manageBios)
            .append(overriddenSettings, that.overriddenSettings).isEquals();
}

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

@Override
public boolean equals(Object obj) {
    if (obj instanceof ReleaseInfo) {
        final ReleaseInfo other = (ReleaseInfo) obj;
        return new EqualsBuilder().append(country, other.country).append(certification, other.certification)
                .append(releaseDate, other.releaseDate).isEquals();
    } else {//from  w w w. ja va2  s . c o m
        return false;
    }
}

From source file:com.qcadoo.view.internal.menu.definitions.MenuCategoryDefinition.java

@Override
public boolean equals(final Object o) {
    if (this == o) {
        return true;
    }/*  w w  w.j a  v  a2  s. c  om*/
    if (o == null || getClass() != o.getClass()) {
        return false;
    }

    MenuCategoryDefinition that = (MenuCategoryDefinition) o;
    return new EqualsBuilder().append(name, that.name).append(pluginIdentifier, that.pluginIdentifier)
            .append(authRole, that.authRole).isEquals();
}