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.omertron.themoviedbapi.model.Language.java

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

From source file:io.cloudslang.lang.entities.ParallelLoopStatement.java

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

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

    ParallelLoopStatement that = (ParallelLoopStatement) o;

    return new EqualsBuilder().appendSuper(super.equals(o)).append(varName, that.varName).isEquals();
}

From source file:de.kaiserpfalzEdv.vaadin.event.BaseEvent.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//from  w  ww. j a va  2  s . c  om
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    BaseEvent rhs = (BaseEvent) obj;
    return new EqualsBuilder().appendSuper(super.equals(obj)).append(this.id, rhs.getId()).isEquals();
}

From source file:de.kaiserpfalzEdv.commons.query.test.QueryTestImpl.java

@Override
public boolean equals(Object other) {
    if (other == this)
        return true;
    if (other == null)
        return false;
    if (!getClass().isAssignableFrom(other.getClass()))
        return false;

    QueryTestImpl that = (QueryTestImpl) other;
    return new EqualsBuilder().append(id, that.getId()).build();
}

From source file:eu.codesketch.scriba.rest.analyser.domain.model.Message.java

@Override
public boolean equals(Object obj) {
    if (null == obj) {
        return false;
    }/*w  w  w. j  a va 2 s.  c  om*/
    if (this == obj) {
        return true;
    }
    if (!getClass().equals(obj.getClass())) {
        return false;
    }
    Message other = (Message) obj;
    return new EqualsBuilder().append(this.status, other.status).append(this.message, other.message).build();
}

From source file:delfos.rs.trustbased.belieffunctions.BeliefFunction.java

@Override
public boolean equals(Object obj) {

    if (obj instanceof BeliefFunction) {

        BeliefFunction beliefFunction = (BeliefFunction) obj;

        Set<Parameter> thisParameters = new TreeSet<Parameter>(this.getParameters());
        Set<Parameter> otherParameters = new TreeSet<Parameter>(beliefFunction.getParameters());

        EqualsBuilder equalsBuilder = new EqualsBuilder();

        equalsBuilder = equalsBuilder.append(this.getClass(), beliefFunction.getClass()).append(thisParameters,
                otherParameters);/*from ww w .  j a v a 2  s.  co m*/

        return equalsBuilder.isEquals();
    } else {
        return false;
    }

}

From source file:com.nesscomputing.httpclient.testing.RegexPathMatcher.java

@Override
public boolean equals(final Object other) {
    if (!(other instanceof RegexPathMatcher)) {
        return false;
    }//from ww  w.  j ava  2 s .  com
    RegexPathMatcher castOther = (RegexPathMatcher) other;
    return new EqualsBuilder().append(method, castOther.method).append(pattern, castOther.pattern).isEquals();
}

From source file:com.cz4031.entity.Author.java

@Override
public boolean equals(Object obj) {
    //        if (obj == null) {
    //            return false;
    //        }/*from   w w  w. j a  va  2 s .c  o  m*/
    //        if (getClass() != obj.getClass()) {
    //            return false;
    //        }
    //        
    //        final Author other = (Author)obj;
    //        if (other.name == null) {
    //            return false;
    //        }
    //        else if (!name.equals(other.name)) {
    //            return false;
    //        }
    //        return true;
    if (!(obj instanceof Author)) {
        return false;
    }
    if (obj == this) {
        return true;
    }

    Author rhs = (Author) obj;
    return new EqualsBuilder().
    // if deriving: appendSuper(super.equals(obj)).
            append(name, rhs.name).isEquals();
}

From source file:com.newlandframework.avatarmq.model.MessageDispatchTask.java

public boolean equals(Object obj) {
    boolean result = false;
    if (obj != null && MessageDispatchTask.class.isAssignableFrom(obj.getClass())) {
        MessageDispatchTask task = (MessageDispatchTask) obj;
        result = new EqualsBuilder().append(clusters, task.getClusters()).append(topic, task.getTopic())
                .append(message, task.getMessage()).isEquals();
    }//from www .  ja  v  a 2 s. c  o m
    return result;
}

From source file:ch.aonyx.broker.ib.api.data.historical.TimeSpan.java

@Override
public boolean equals(final Object obj) {
    if (obj == null) {
        return false;
    }/*from  w w w  . j  a  v  a2 s .co  m*/
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    final TimeSpan rhs = (TimeSpan) obj;
    return new EqualsBuilder().append(duration, rhs.duration).append(unit, rhs.unit).isEquals();
}