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.invariantproperties.project.student.matcher.CourseEquality.java

@Override
public boolean matchesSafely(Course actual) {
    if (actual == null) {
        return false;
    }/* w  w w .jav  a2  s.c om*/

    EqualsBuilder eq = new EqualsBuilder();
    eq.append(expected.getId(), actual.getId());
    eq.append(expected.getUuid(), actual.getUuid());
    eq.append(expected.getCode(), actual.getCode());
    eq.append(expected.getName(), actual.getName());
    eq.append(expected.getSummary(), actual.getSummary());
    eq.append(expected.getDescription(), actual.getDescription());
    eq.append(expected.getCreditHours(), actual.getCreditHours());
    eq.append(expected.getCreationDate(), actual.getCreationDate());

    return eq.isEquals();
}

From source file:com.invariantproperties.project.student.matcher.SectionEquality.java

@Override
public boolean matchesSafely(Section actual) {
    if (actual == null) {
        return false;
    }//from   w  ww.  jav  a  2s  .  c o  m

    EqualsBuilder eq = new EqualsBuilder();
    eq.append(expected.getId(), actual.getId());
    eq.append(expected.getUuid(), actual.getUuid());
    eq.append(expected.getName(), actual.getName());
    eq.append(expected.getCreationDate(), actual.getCreationDate());

    return eq.isEquals();
}

From source file:com.newlandframework.avatarmq.consumer.ClustersRelation.java

public boolean equals(Object obj) {
    boolean result = false;
    if (obj != null && ClustersRelation.class.isAssignableFrom(obj.getClass())) {
        ClustersRelation clusters = (ClustersRelation) obj;
        result = new EqualsBuilder().append(id, clusters.getId()).isEquals();
    }//from  ww w . j av a  2  s.c  om
    return result;
}

From source file:com.invariantproperties.project.student.matcher.StudentEquality.java

@Override
public boolean matchesSafely(Student actual) {
    if (actual == null) {
        return false;
    }//from   w w w  .  ja  v  a2 s  .  c  o  m

    EqualsBuilder eq = new EqualsBuilder();
    eq.append(expected.getId(), actual.getId());
    eq.append(expected.getUuid(), actual.getUuid());
    eq.append(expected.getName(), actual.getName());
    eq.append(expected.getEmailAddress(), actual.getEmailAddress());
    eq.append(expected.getCreationDate(), actual.getCreationDate());

    return eq.isEquals();
}

From source file:com.wavemaker.commons.model.security.SessionTimeoutConfig.java

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

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

    final SessionTimeoutConfig that = (SessionTimeoutConfig) o;

    return new EqualsBuilder().append(timeoutValue, that.timeoutValue).append(type, that.type)
            .append(pageName, that.pageName).isEquals();
}

From source file:at.ac.tuwien.dsg.cloud.utilities.messaging.lightweight.rabbitMq.RabbitMqMessage.java

@Override
public boolean equals(Object o) {

    if (o == null) {
        return false;
    }/*from   ww w .j  a va 2s  .  co m*/

    if (!(o instanceof RabbitMqMessage)) {
        return false;
    }

    RabbitMqMessage msg = (RabbitMqMessage) o;

    return new EqualsBuilder().appendSuper(super.equals(msg)).append(content, msg.content).isEquals();
}

From source file:com.hp.ov.sdk.dto.datacenter.PhysicalLocation.java

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

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

        return new EqualsBuilder().append(resourceUri, that.resourceUri).append(rotation, that.rotation)
                .append(x, that.x).append(y, that.y).isEquals();
    }/* w  w  w . j  av a2  s  .c  o m*/
    return false;
}

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

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

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

    LocalStorageSettingsTemplate that = (LocalStorageSettingsTemplate) obj;

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

From source file:com.flipkart.foxtrot.common.FieldTypeMapping.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//  w w  w .ja va2 s  . c  o m
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    FieldTypeMapping rhs = (FieldTypeMapping) obj;
    return new EqualsBuilder().append(this.field, rhs.field).append(this.type, rhs.type).isEquals();
}

From source file:com.invariantproperties.project.student.matcher.ClassroomEquality.java

@Override
public boolean matchesSafely(Classroom actual) {
    if (actual == null) {
        return false;
    }//from  w w w.jav a 2  s  . c  o  m

    EqualsBuilder eq = new EqualsBuilder();
    eq.append(expected.getId(), actual.getId());
    eq.append(expected.getUuid(), actual.getUuid());
    eq.append(expected.getName(), actual.getName());
    eq.append(expected.getCreationDate(), actual.getCreationDate());

    return eq.isEquals();
}