Example usage for org.apache.commons.lang3.builder EqualsBuilder isEquals

List of usage examples for org.apache.commons.lang3.builder EqualsBuilder isEquals

Introduction

In this page you can find the example usage for org.apache.commons.lang3.builder EqualsBuilder isEquals.

Prototype

boolean isEquals

To view the source code for org.apache.commons.lang3.builder EqualsBuilder isEquals.

Click Source Link

Document

If the fields tested are equals.

Usage

From source file:nl.mpi.lamus.workspace.importing.implementation.LinkImportProblem.java

@Override
public boolean equals(Object obj) {

    if (this == obj) {
        return true;
    }/*from  w w  w .  j a va 2s .  co m*/
    if (!(obj instanceof LinkImportProblem)) {
        return false;
    }
    LinkImportProblem other = (LinkImportProblem) obj;

    EqualsBuilder equalsB = new EqualsBuilder().appendSuper(super.equals(obj))
            .append(this.parentNode, other.getParentNode()).append(this.childNode, other.getChildNode());

    return equalsB.isEquals();
}

From source file:nl.mpi.lamus.workspace.importing.implementation.MatchImportProblem.java

@Override
public boolean equals(Object obj) {

    if (this == obj) {
        return true;
    }//from   w w w  .ja v a 2 s.  c o  m
    if (!(obj instanceof MatchImportProblem)) {
        return false;
    }
    MatchImportProblem other = (MatchImportProblem) obj;

    EqualsBuilder equalsB = new EqualsBuilder().appendSuper(super.equals(obj))
            .append(this.parentNode, other.getParentNode())
            .append(this.childReference, other.getChildReference());

    return equalsB.isEquals();
}

From source file:nl.mpi.lamus.workspace.model.implementation.LamusWorkspace.java

@Override
public boolean equals(Object obj) {

    if (this == obj) {
        return true;
    }/*ww  w  .  j a v a  2  s .  c  om*/
    if (!(obj instanceof LamusWorkspace)) {
        return false;
    }
    LamusWorkspace other = (LamusWorkspace) obj;

    EqualsBuilder equalsB = new EqualsBuilder().append(this.workspaceID, other.getWorkspaceID())
            .append(this.userID, other.getUserID()).append(this.topNodeID, other.getTopNodeID())
            .append(this.topNodeArchiveURI, other.getTopNodeArchiveURI())
            .append(this.topNodeArchiveURL, other.getTopNodeArchiveURL())
            .append(this.startDate, other.getStartDate()).append(this.endDate, other.getEndDate())
            .append(this.sessionStartDate, other.getSessionStartDate())
            .append(this.sessionEndDate, other.getSessionEndDate())
            .append(this.usedStorageSpace, other.getUsedStorageSpace())
            .append(this.maxStorageSpace, other.getMaxStorageSpace()).append(this.status, other.getStatus())
            .append(this.message, other.getMessage()).append(this.crawlerID, other.getCrawlerID());

    return equalsB.isEquals();
}

From source file:nl.mpi.lamus.workspace.model.implementation.LamusWorkspaceNode.java

@Override
public boolean equals(Object obj) {

    if (this == obj) {
        return true;
    }/*www  .j  a  v a2s .com*/
    if (!(obj instanceof LamusWorkspaceNode)) {
        return false;
    }
    LamusWorkspaceNode other = (LamusWorkspaceNode) obj;

    EqualsBuilder equalsB = new EqualsBuilder().append(this.workspaceNodeID, other.getWorkspaceNodeID())
            .append(this.workspaceID, other.getWorkspaceID())
            .append(this.profileSchemaURI, other.getProfileSchemaURI()).append(this.name, other.getName())
            .append(this.title, other.getTitle()).append(this.type, other.getType())
            .append(this.workspaceURL, other.getWorkspaceURL()).append(this.archiveURI, other.getArchiveURI())
            .append(this.archiveURL, other.getArchiveURL()).append(this.originURI, other.getOriginURI())
            .append(this.status, other.getStatus()).append(this.isProtected, other.isProtected())
            .append(this.format, other.getFormat());

    return equalsB.isEquals();
}

From source file:nl.mpi.lamus.workspace.model.implementation.LamusWorkspaceNodeLink.java

@Override
public boolean equals(Object obj) {

    if (this == obj) {
        return true;
    }/*from  ww  w  .ja v a 2  s  . c o m*/
    if (!(obj instanceof LamusWorkspaceNodeLink)) {
        return false;
    }
    LamusWorkspaceNodeLink other = (LamusWorkspaceNodeLink) obj;

    EqualsBuilder equalsB = new EqualsBuilder()
            .append(this.parentWorkspaceNodeID, other.getParentWorkspaceNodeID())
            .append(this.childWorkspaceNodeID, other.getChildWorkspaceNodeID());

    return equalsB.isEquals();
}

From source file:nl.mpi.lamus.workspace.model.implementation.LamusWorkspaceNodeReplacement.java

@Override
public boolean equals(Object obj) {

    if (this == obj) {
        return true;
    }/* www.  j  a  va 2s.c  om*/
    if (!(obj instanceof LamusWorkspaceNodeReplacement)) {
        return false;
    }
    LamusWorkspaceNodeReplacement other = (LamusWorkspaceNodeReplacement) obj;

    EqualsBuilder equalsB = new EqualsBuilder().append(this.oldNodeURI, other.getOldNodeURI())
            .append(this.newNodeURI, other.getNewNodeURI())
            .append(this.replacementStatus, other.getReplacementStatus())
            .append(this.replacementError, other.getReplacementError());

    return equalsB.isEquals();
}

From source file:nl.mpi.lamus.workspace.model.implementation.LamusWorkspaceReplacedNodeUrlUpdate.java

@Override
public boolean equals(Object obj) {

    if (this == obj) {
        return true;
    }//  w ww  .  j  av  a 2  s.com
    if (!(obj instanceof LamusWorkspaceReplacedNodeUrlUpdate)) {
        return false;
    }
    LamusWorkspaceReplacedNodeUrlUpdate other = (LamusWorkspaceReplacedNodeUrlUpdate) obj;

    EqualsBuilder equalsB = new EqualsBuilder().append(this.nodeUri, other.getNodeUri())
            .append(this.updatedUrl, other.getUpdatedUrl()).append(this.updateStatus, other.getUpdateStatus())
            .append(this.updateError, other.getUpdateError());

    return equalsB.isEquals();
}

From source file:nl.mpi.lamus.workspace.upload.implementation.ZipUploadResult.java

@Override
public boolean equals(Object obj) {

    if (this == obj) {
        return true;
    }/*from  ww  w.j  a  v a 2s .  co m*/
    if (!(obj instanceof ZipUploadResult)) {
        return false;
    }
    ZipUploadResult other = (ZipUploadResult) obj;

    EqualsBuilder equalsB = new EqualsBuilder().append(this.successfulUploads, other.getSuccessfulUploads())
            .append(this.failedUploads, other.getFailedUploads());

    return equalsB.isEquals();
}

From source file:org.bgp4j.net.attributes.CommunityPathAttribute.java

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

    EqualsBuilder builder = (new EqualsBuilder()).append(getCommunity(), o.getCommunity())
            .append(getMembers().size(), o.getMembers().size());

    if (builder.isEquals()) {
        Iterator<CommunityMember> lit = getMembers().iterator();
        Iterator<CommunityMember> rit = o.getMembers().iterator();

        while (lit.hasNext())
            builder.append(lit.next(), rit.next());
    }/*from   w w w .  ja  v a 2  s. co m*/

    return builder.isEquals();
}

From source file:org.bgp4j.net.attributes.MultiProtocolReachableNLRI.java

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

    EqualsBuilder builer = (new EqualsBuilder()).append(getAddressFamily(), o.getAddressFamily())
            .append(getSubsequentAddressFamily(), o.getSubsequentAddressFamily())
            .append(getNextHop(), o.getNextHop()).append(getNlris().size(), o.getNlris().size());

    if (builer.isEquals()) {
        Iterator<NetworkLayerReachabilityInformation> lit = getNlris().iterator();
        Iterator<NetworkLayerReachabilityInformation> rit = o.getNlris().iterator();

        while (lit.hasNext())
            builer.append(lit.next(), rit.next());
    }//from  w w w  .j a  v a2s. co  m

    return builer.isEquals();
}