Example usage for org.apache.commons.lang.builder CompareToBuilder CompareToBuilder

List of usage examples for org.apache.commons.lang.builder CompareToBuilder CompareToBuilder

Introduction

In this page you can find the example usage for org.apache.commons.lang.builder CompareToBuilder CompareToBuilder.

Prototype

public CompareToBuilder() 

Source Link

Document

Constructor for CompareToBuilder.

Starts off assuming that the objects are equal.

Usage

From source file:com.hmsinc.epicenter.model.workflow.Event.java

public int compareTo(Event rhs) {
    return new CompareToBuilder().append(timestamp, rhs.getTimestamp()).append(id, rhs.getId()).toComparison();
}

From source file:com.hmsinc.epicenter.model.workflow.WorkflowState.java

public int compareTo(WorkflowState rhs) {
    return new CompareToBuilder().append(name, rhs.getName()).toComparison();
}

From source file:com.edmunds.etm.management.api.ManagementVip.java

@Override
public int compareTo(ManagementVip other) {

    // CAUTION: ImmutableMap's don't implement compareTo() so I have excluded poolMembers.
    //          this decision may need to be revisited.

    // Probably only the first 2 will be used.
    return new CompareToBuilder().append(mavenModule, other.mavenModule).append(hostAddress, other.hostAddress)
            .append(rootContext, other.rootContext).append(rules, other.rules)
            .append(vipType, other.getVipType()).append(loadBalancerState, other.loadBalancerState)
            .append(httpMonitor, other.httpMonitor).toComparison();
}

From source file:com.hmsinc.epicenter.model.analysis.classify.Classification.java

public int compareTo(Classification c) {
    return new CompareToBuilder().append(getCategory(), c.getCategory()).toComparison();
}

From source file:gov.nih.nci.firebird.data.Certification.java

@Override
public int compareTo(Certification o) {
    return new CompareToBuilder().append(getCertificationType(), o.getCertificationType()).toComparison();
}

From source file:gov.nih.nci.caarray.domain.file.CaArrayFile.java

/**
 * {@inheritDoc}/*from  w w  w  .j  a  v  a 2  s. c  o  m*/
 */
@Override
public int compareTo(CaArrayFile o) {
    if (this == o) {
        return 0;
    }

    return new CompareToBuilder().append(getProject(), o.getProject())
            .append(getFileStatus(), o.getFileStatus()).append(getFileType(), o.getFileType())
            .append(getName(), o.getName()).append(getId(), o.getId()).toComparison();
}

From source file:com.twitter.hraven.HdfsStats.java

public int compareTo(HdfsStats other) {
    if (other == null) {
        return -1;
    }//from   w  w  w.j a va 2  s. co  m
    return new CompareToBuilder().append(this.hdfsStatsKey, other.getHdfsStatsKey()).toComparison();
}

From source file:com.algoTrader.vo.PortfolioValueVO.java

/**
 * @param object to compare this object against
 * @return int if equal//from  w w w. j  a  v a2s .  c  o m
 * @see Comparable#compareTo(Object)
 */
public int compareTo(final PortfolioValueVO object) {
    if (object == null) {
        return -1;
    }
    // Check if the same object instance
    if (object == this) {
        return 0;
    }
    return new CompareToBuilder().append(this.getSecuritiesCurrentValue(), object.getSecuritiesCurrentValue())
            .append(this.getCashBalance(), object.getCashBalance())
            .append(this.getMaintenanceMargin(), object.getMaintenanceMargin())
            .append(this.getNetLiqValue(), object.getNetLiqValue()).toComparison();
}

From source file:gov.nih.nci.firebird.data.Organization.java

@Override
public int compareTo(Organization t) {
    return new CompareToBuilder().append(getName(), t.getName())
            .append(getPostalAddress(), t.getPostalAddress()).toComparison();
}

From source file:com.algoTrader.vo.SimulationResultVO.java

/**
 * @param object to compare this object against
 * @return int if equal/*from w w  w.  j  ava2s  .  c o m*/
 * @see Comparable#compareTo(Object)
 */
public int compareTo(final SimulationResultVO object) {
    if (object == null) {
        return -1;
    }
    // Check if the same object instance
    if (object == this) {
        return 0;
    }
    return new CompareToBuilder().append(this.getMins(), object.getMins())
            .append(this.getDataSet(), object.getDataSet())
            .append(this.getNetLiqValue(), object.getNetLiqValue())
            .append(this.getMonthlyPerformanceVOs(), object.getMonthlyPerformanceVOs())
            .append(this.getPerformanceKeysVO(), object.getPerformanceKeysVO())
            .append(this.getMaxDrawDownVO(), object.getMaxDrawDownVO()).toComparison();
}