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.textocat.textokit.eval.matching.FSCollectionFeatureMatcher.java

@Override
public boolean equals(Object obj) {
    if (!(obj instanceof FSCollectionFeatureMatcher)) {
        return false;
    }//from   w  w w  .  ja  va  2s.  c o  m
    FSCollectionFeatureMatcher<?, ?> that = (FSCollectionFeatureMatcher<?, ?>) obj;
    return new EqualsBuilder().append(this.feature, that.feature).append(this.elemMatcher, that.elemMatcher)
            .append(this.ignoreOrder, that.ignoreOrder).isEquals();
}

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

@Override
public boolean matches(final Object item) {
    boolean match = false;
    if (item instanceof PhotoEntity) {
        final PhotoEntity actual = (PhotoEntity) item;
        final EqualsBuilder matcher = new EqualsBuilder();
        matcher.appendSuper(actual.getURI().toString().endsWith("/gallery/componentName5/albums/3/photos/7"));
        matcher.appendSuper(actual.getParentURI().toString().endsWith("/gallery/componentName5/albums/3"));
        matcher.append("photo", actual.getType());
        matcher.append(expected.getId(), actual.getId());
        matcher.append(expected.getTitle(), actual.getTitle());
        matcher.append(expected.getDescription(), actual.getDescription());
        matcher.appendSuper(//ww w . ja v a2  s .c o  m
                actual.getPreviewUrl().endsWith("/gallery/componentName5/albums/3/photos/7/previewContent"));
        matcher.appendSuper(actual.getUrl().endsWith("/gallery/componentName5/albums/3/photos/7/content"));
        match = matcher.isEquals();
    }
    return match;
}

From source file:com.flowpowered.engine.network.message.LoginMessage.java

@Override
public boolean equals(Object obj) {
    if (obj instanceof LoginMessage) {
        final LoginMessage other = (LoginMessage) obj;
        return new EqualsBuilder().append(playerName, other.playerName).isEquals();
    } else {/*w  w w .  ja  v  a  2 s . c  om*/
        return false;
    }
}

From source file:de.uniwue.info6.database.map.User.java

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

    User user = (User) obj;/*  ww w . j av  a2s.  c o  m*/
    return new EqualsBuilder().append(id, user.getId()).isEquals();
}

From source file:com.btisystems.pronx.ems.core.model.testpackage1.I_Device.java

@Override
public boolean equals(final Object obj) {
    if (obj == null) {
        return false;
    }//w  w w  . j av  a2s.  c  om
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != this.getClass()) {
        return false;
    }
    final I_Device rhs = ((I_Device) obj);
    return new EqualsBuilder().append(entityTest1, rhs.entityTest1).isEquals();
}

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

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

    return (new EqualsBuilder()).append(this.getDiscriminator(), o.getDiscriminator()).isEquals();
}

From source file:br.usp.poli.lta.cereda.wirth2ape.tuple.Pair.java

@Override
public boolean equals(Object object) {
    if (object == null) {
        return false;
    }/*  w  w w .  j  a  v  a  2 s .co  m*/
    if (getClass() != object.getClass()) {
        return false;
    }
    final Pair<?, ?> reference = (Pair<?, ?>) object;
    return new EqualsBuilder().append(first, reference.first).append(second, reference.second).isEquals();
}

From source file:com.omertron.themoviedbapi.model.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(isoCode, other.isoCode).isEquals();
    } else {/*w w  w. ja v  a2 s. c  om*/
        return false;
    }
}

From source file:com.comcast.cdn.traffic_control.traffic_router.core.cache.CacheLocation.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    } else if (obj instanceof CacheLocation) {
        final CacheLocation rhs = (CacheLocation) obj;
        return new EqualsBuilder().append(getId(), rhs.getId()).isEquals();
    } else {//from w  w  w . j  a  v  a2s  .co m
        return false;
    }
}

From source file:com.smartling.cms.gateway.client.command.BaseCommand.java

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

    BaseCommand command = (BaseCommand) obj;
    return new EqualsBuilder().append(getId(), command.getId()).append(getUri(), command.getUri()).build();
}