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.galenframework.ide.devices.commands.DeviceOpenUrlCommand.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    } else if (obj == this) {
        return true;
    } else if (!(obj instanceof DeviceOpenUrlCommand)) {
        return false;
    } else {/*w w  w.  j  av  a  2  s . c o  m*/
        DeviceOpenUrlCommand rhs = (DeviceOpenUrlCommand) obj;
        return new EqualsBuilder().append(rhs.getCommandId(), this.getCommandId()).append(rhs.url, this.url)
                .isEquals();
    }
}

From source file:com.sixt.service.framework.registry.consul.ConsulHealthEntry.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;
    }
    ConsulHealthEntry rhs = (ConsulHealthEntry) obj;
    return new EqualsBuilder().append(id, rhs.id).append(status, rhs.status).append(address, rhs.address)
            .append(port, rhs.port).build();
}

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

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

    final EqualsBuilder builder = (new EqualsBuilder()).append(this.getMembers().size(), o.getMembers().size());

    if (builder.isEquals()) {
        final Iterator<CommunityMember> lit = this.getMembers().iterator();
        final Iterator<CommunityMember> rit = o.getMembers().iterator();

        while (lit.hasNext()) {
            builder.append(lit.next(), rit.next());
        }//from   w w w.  java  2s .c  o  m
    }

    return builder.isEquals();
}

From source file:com.galenframework.suite.actions.GalenPageActionOpen.java

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

    return new EqualsBuilder().append(this.url, rhs.url).isEquals();
}

From source file:com.mycsense.carbondb.domain.DerivedRelation.java

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

    DerivedRelation rhs = (DerivedRelation) obj;
    return new EqualsBuilder().append(source, rhs.source).append(coeff, rhs.coeff)
            .append(destination, rhs.destination).append(exponent, rhs.exponent).isEquals();
}

From source file:com.supernet.model.accounts.Account.java

@Override
public boolean equals(Object o) {
    if (o == null) {
        return false;
    }//from   w w  w.  j ava2  s .com

    if (this == o) {
        return true;
    }

    if (Hibernate.getClass(this) != Hibernate.getClass(o)) {
        return false;
    }

    Account account = (Account) o;

    return new EqualsBuilder().appendSuper(super.equals(o)).append(getFirstName(), account.getFirstName())
            .append(getLastName(), account.getLastName()).append(getLogin(), account.getLogin())
            .append(getPassword(), account.getPassword()).append(getUserRole(), account.getUserRole())
            .isEquals();
}

From source file:com.galenframework.specs.page.Locator.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }/*  ww w .j a v  a  2s . com*/
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof Locator)) {
        return false;
    }
    Locator rhs = (Locator) obj;
    return new EqualsBuilder().append(locatorType, rhs.locatorType).append(locatorValue, rhs.locatorValue)
            .append(parent, rhs.parent).append(getCorrections(), rhs.getCorrections()).isEquals();
}

From source file:com.omertron.themoviedbapi.model.media.Translation.java

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

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

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

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

    SanStorageTemplate that = (SanStorageTemplate) obj;

    return new EqualsBuilder().append(hostOSType, that.hostOSType)
            .append(manageSanStorage, that.manageSanStorage).append(volumeAttachments, that.volumeAttachments)
            .isEquals();//from   w  ww. ja  va2s.c  om
}

From source file:com.esofthead.mycollab.module.ecm.domain.DriveInfo.java

public final boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//from w  w w .j a  va2s .  co m
    if (obj == this) {
        return true;
    }
    if (!obj.getClass().isAssignableFrom(getClass())) {
        return false;
    }
    DriveInfo item = (DriveInfo) obj;
    return new EqualsBuilder().append(id, item.id).build();
}