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:ch.aonyx.broker.ib.api.system.RegisterClientRequest.java

@Override
public boolean equals(final Object obj) {
    if (obj == null) {
        return false;
    }/*from  www  .  j  a  va 2  s  . c om*/
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    final RegisterClientRequest rhs = (RegisterClientRequest) obj;
    return new EqualsBuilder().append(clientId, rhs.clientId).isEquals();
}

From source file:br.usp.poli.lta.cereda.nfa2dfa.utils.Token.java

@Override
public boolean equals(Object object) {
    if (object == null) {
        return false;
    }//from  w  w  w  .j a  v a2s. c o  m
    if (getClass() != object.getClass()) {
        return false;
    }
    final Token reference = (Token) object;
    return new EqualsBuilder().append(type, reference.type).isEquals();
}

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

@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }//from   ww w.  j a v  a2s  .c  om

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

    WorkerGroupStatement that = (WorkerGroupStatement) o;

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

From source file:ca.travelagency.persistence.query.OrderBy.java

@Override
public boolean equals(Object object) {
    if (this == object) {
        return true;
    }//from ww w. ja v a  2  s .c o m
    if (!(object instanceof OrderBy)) {
        return false;
    }
    OrderBy other = (OrderBy) object;
    return new EqualsBuilder().append(getProperty(), other.getProperty())
            .append(isAscending(), other.isAscending()).isEquals();
}

From source file:com.silverpeas.gallery.web.AlbumEntityMatcher.java

@SuppressWarnings("unchecked")
@Override/*from w w w  .j a v a2s  .  c  o m*/
public boolean matches(final Object item) {
    boolean match = false;
    if (item instanceof LinkedHashMap) {
        final AlbumEntity actual = from((LinkedHashMap<String, Object>) item);
        final EqualsBuilder matcher = new EqualsBuilder();
        matcher.appendSuper(actual.getURI().toString().endsWith("/gallery/componentName5/albums/3"));
        matcher.appendSuper(actual.getParentURI().toString().endsWith("/gallery/componentName5/albums/0"));
        matcher.append(String.valueOf(expected.getId()), actual.getId());
        matcher.append(expected.getName(), actual.getTitle());
        matcher.append(expected.getDescription(), actual.getDescription());
        matcher.append(4, actual.getMediaList().size());
        Set<String> keySet = actual.getMediaList().keySet();
        matcher.appendSuper(keySet.contains(PHOTO_ID));
        matcher.appendSuper(keySet.contains(VIDEO_ID));
        matcher.appendSuper(keySet.contains(SOUND_ID));
        matcher.appendSuper(keySet.contains(STREAMING_ID));
        match = matcher.isEquals();
    }
    return match;
}

From source file:ca.travelagency.identity.NameCriteria.java

@Override
public boolean equals(Object object) {
    if (this == object) {
        return true;
    }/*from ww w  .j  a v a 2 s  .com*/
    if (!(object instanceof NameCriteria)) {
        return false;
    }
    return new EqualsBuilder().append(getName(), ((NameCriteria) object).getName()).isEquals();
}

From source file:info.carlwithak.mpxg2.model.parameters.BeatRate.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }/*from  w  w w  .  j  a  v  a 2  s .co  m*/
    if (getClass() != obj.getClass()) {
        return false;
    }
    final BeatRate other = (BeatRate) obj;
    return new EqualsBuilder().append(this.measures, other.measures).append(this.beats, other.beats).isEquals();
}

From source file:com.norconex.importer.handler.tagger.AbstractDocumentTagger.java

@Override
public boolean equals(final Object other) {
    if (!(other instanceof AbstractDocumentTagger)) {
        return false;
    }/* w  w  w .j  a v a  2s  . co m*/
    return new EqualsBuilder().appendSuper(super.equals(other)).isEquals();
}

From source file:com.github.catageek.bytecart.routing.Metric.java

@Override
public boolean equals(Object o) {
    if (o == null) {
        return false;
    }/* ww w.  ja va  2s . c o  m*/
    if (o == this) {
        return true;
    }
    if (!(o instanceof Metric)) {
        return false;
    }

    Metric rhs = (Metric) o;

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

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

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

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

        return that.canEqual(this) && new EqualsBuilder().appendSuper(super.equals(obj))
                .append(connectionTemplateUri, that.connectionTemplateUri).append(fabricUri, that.fabricUri)
                .append(managedSanUri, that.managedSanUri).append(vlanId, that.vlanId).isEquals();
    }/*from  w ww  .  ja va2  s  .com*/
    return false;
}