List of usage examples for org.apache.commons.lang.builder CompareToBuilder CompareToBuilder
public CompareToBuilder()
Constructor for CompareToBuilder.
Starts off assuming that the objects are equal.
From source file:com.hmsinc.epicenter.webapp.dto.InvestigationDTO.java
public int compareTo(InvestigationDTO other) { return new CompareToBuilder().append(getId(), other.getId()).toComparison(); }
From source file:com.opengamma.util.tuple.Triple.java
/** * Compares the pair based on the first element followed by the second element. * /* w ww . j a v a2s . c o m*/ * @param other the other pair, not null * @return negative if this is less, zero if equal, positive if greater */ @Override public int compareTo(Triple<A, B, C> other) { return new CompareToBuilder().append(_first, other._first).append(_second, other._second) .append(_third, other._third).toComparison(); }
From source file:eu.debooy.natuur.domain.DetailDto.java
public int compareTo(DetailDto detailDto) { return new CompareToBuilder().append(parentId, detailDto.parentId).append(taxonId, detailDto.taxonId) .toComparison();//from www .j a v a 2 s . c o m }
From source file:com.blackberry.logdriver.boom.LogLineData.java
@Override public int compareTo(LogLineData o) { return new CompareToBuilder().append(this.timestamp, o.timestamp).append(this.createTime, o.createTime) .append(this.blockNumber, o.blockNumber).append(this.lineNumber, o.lineNumber) .append(this.eventId, o.eventId).toComparison(); }
From source file:com.hmsinc.epicenter.model.workflow.EventDisposition.java
public int compareTo(EventDisposition o) { return new CompareToBuilder().append(getType(), o.getType()).append(getName(), o.getName()) .append(getId(), o.getId()).toComparison(); }
From source file:com.algoTrader.vo.ib.FundamentalData.java
/** * @param object to compare this object against * @return int if equal/*ww w .j a va 2 s. c o m*/ * @see Comparable#compareTo(Object) */ public int compareTo(final FundamentalData object) { if (object == null) { return -1; } // Check if the same object instance if (object == this) { return 0; } return new CompareToBuilder().append(this.getReqId(), object.getReqId()) .append(this.getData(), object.getData()).toComparison(); }
From source file:griffon.plugins.domain.methods.MethodSignature.java
public int compareTo(MethodSignature other) { return new CompareToBuilder().append(methodName, other.methodName) .append(parameterClassnames, other.parameterClassnames).append(returnType, other.returnType) .append(isStatic, other.isStatic).toComparison(); }
From source file:com.hmsinc.epicenter.model.attribute.AgeGroup.java
public int compareTo(AgeGroup rhs) { return new CompareToBuilder().append(minAge, rhs.getMinAge()).toComparison(); }
From source file:com.algoTrader.vo.ib.ReceiveFA.java
/** * @param object to compare this object against * @return int if equal// w w w . j a v a 2 s .c om * @see Comparable#compareTo(Object) */ public int compareTo(final ReceiveFA object) { if (object == null) { return -1; } // Check if the same object instance if (object == this) { return 0; } return new CompareToBuilder().append(this.getFaDataType(), object.getFaDataType()) .append(this.getXml(), object.getXml()).toComparison(); }
From source file:net.rrm.ehour.domain.UserDepartment.java
@Override public int compareTo(UserDepartment o) { return new CompareToBuilder().append(getCode(), o.getCode()).append(getName(), o.getName()).toComparison(); }