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.linux.designpatterns.observerobservable.impl.SimpleObserver.java

/**
 * {@inheritDoc}//from w ww . j  a  v a 2s  . com
 */
@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    SimpleObserver rhs = (SimpleObserver) obj;
    return new EqualsBuilder().append(name, rhs.name).isEquals();
}

From source file:com.galenframework.specs.SpecRange.java

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

    SpecRange rhs = (SpecRange) obj;//  w w w.  j  a  v a 2  s  . co  m
    return new EqualsBuilder().append(range, rhs.range).isEquals();
}

From source file:com.antonjohansson.elasticsearchshell.domain.IndexMappings.java

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

    IndexMappings that = (IndexMappings) obj;
    return new EqualsBuilder().append(this.mappings, that.mappings).isEquals();
}

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

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

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

    VlanInfo vlanInfo = (VlanInfo) obj;//  ww  w. jav  a2 s  . c  om

    return new EqualsBuilder().append(restUri, vlanInfo.restUri).append(vlanNumber, vlanInfo.vlanNumber)
            .isEquals();
}

From source file:br.usp.poli.lta.cereda.aa.examples.ExampleState.java

@Override
public boolean equals(Object object) {
    if (object == null) {
        return false;
    } else {//  ww w .j  a v  a  2  s . co m
        if (!(object.getClass().equals(ExampleState.class))) {
            return false;
        } else {
            return new EqualsBuilder().append(this.getValue(), ((ExampleState) object).getValue()).isEquals();
        }
    }
}

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

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

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

    StackingPortPair that = (StackingPortPair) obj;

    return new EqualsBuilder().append(destPortUri, that.destPortUri).append(srcPortUri, that.srcPortUri)
            .isEquals();/*from   ww w.  ja  v  a 2  s.  c  o  m*/
}

From source file:com.hp.ov.sdk.dto.serverhardwaretype.SettingOptionLink.java

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

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

        return new EqualsBuilder().append(action, that.action).append(optionId, that.optionId)
                .append(settingId, that.settingId).isEquals();
    }//from w w w  . jav a2s . co m
    return false;
}

From source file:de.blizzy.documentr.page.PageChangedEvent.java

@Override
public boolean equals(Object o) {
    if (o == this) {
        return true;
    } else if ((o != null) && o.getClass().equals(getClass())) {
        PageChangedEvent other = (PageChangedEvent) o;
        return new EqualsBuilder().append(projectName, other.projectName).append(branchName, other.branchName)
                .append(path, other.path).isEquals();
    }//w  w w.  j  a va  2s . co m
    return false;
}

From source file:de.kaiserpfalzEdv.iam.core.role.PermissionDO.java

@Override
public boolean equals(Object other) {
    if (AttachedPermission.class.isAssignableFrom(other.getClass())) {
        Permission that = (Permission) other;
        return new EqualsBuilder().append(getId(), that.getId()).build();

    }//  w  w  w.j av  a  2s. c om

    return super.equals(other);
}

From source file:net.sf.jabb.util.stat.TimePeriod.java

@Override
public boolean equals(Object o) {
    if (o == this) {
        return true;
    }//from w w  w.jav a 2  s. c o  m

    if (o != null && o instanceof TimePeriod) {
        TimePeriod that = (TimePeriod) o;
        return new EqualsBuilder().append(this.amount, that.amount).append(this.unit, that.unit).isEquals();
    } else {
        return false;
    }
}