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.gst.portfolio.floatingrates.data.FloatingRatePeriodData.java
@Override public int compareTo(final FloatingRatePeriodData obj) { if (obj == null) { return -1; }//from w w w .j ava 2 s . co m return new CompareToBuilder() // .append(this.id, obj.id) // .append(this.fromDate, obj.fromDate) // .append(this.isActive, obj.isActive) // .toComparison(); }
From source file:com.twitter.hraven.FlowKey.java
/** * Compares two FlowKey objects on the basis of * their cluster, userName, appId and encodedRunId * * @param other// w w w . j av a 2 s . c o m * @return 0 if this cluster, userName, appId and encodedRunId are equal to * the other's cluster, userName, appId and encodedRunId, * 1 if this cluster or userName or appId or encodedRunId are less than * the other's cluster, userName, appId and encodedRunId, * -1 if this cluster and userName and appId and encodedRunId are greater * the other's cluster, userName, appId and encodedRunId, * */ @Override public int compareTo(Object other) { if (other == null) { return -1; } FlowKey otherKey = (FlowKey) other; return new CompareToBuilder().appendSuper(super.compareTo(other)) .append(getEncodedRunId(), otherKey.getEncodedRunId()).toComparison(); }
From source file:net.rrm.ehour.domain.TimesheetCommentId.java
/** * @see java.lang.Comparable#compareTo(Object) *///from w w w .j a v a2s .co m public int compareTo(TimesheetCommentId object) { return new CompareToBuilder().append(this.getCommentDate(), object.getCommentDate()) .append(this.getUserId(), object.getUserId()).toComparison(); }
From source file:com.twitter.hraven.QualifiedPathKey.java
@Override public int compareTo(Object other) { if (other == null) { return -1; }/* w ww . j a v a 2s . com*/ QualifiedPathKey otherKey = (QualifiedPathKey) other; if (StringUtils.isNotBlank(this.namespace)) { return new CompareToBuilder().append(this.cluster, otherKey.getCluster()) .append(getPath(), otherKey.getPath()).append(this.namespace, otherKey.getNamespace()) .toComparison(); } else { return new CompareToBuilder().append(this.cluster, otherKey.getCluster()) .append(getPath(), otherKey.getPath()).toComparison(); } }
From source file:com.bcpv.webapp.displaytag.decorators.ReportableListObject.java
/** * @see Comparable#compareTo(Object)// w w w. java2 s .co m */ public int compareTo(Object object) { ReportableListObject myClass = (ReportableListObject) object; return new CompareToBuilder().append(this.project, myClass.project).append(this.amount, myClass.amount) .append(this.city, myClass.city).append(this.task, myClass.task).toComparison(); }
From source file:core.datapoint.DataMark.java
public int compareTo(Object o) { DataMark rhs = (DataMark) o;/* w w w.ja v a 2s .c om*/ return new CompareToBuilder().append(typeCode, rhs.typeCode).append(value, rhs.value) .append(dataPoint, rhs.dataPoint).toComparison(); }
From source file:com.hmsinc.epicenter.webapp.dto.ActivityDTO.java
public int compareTo(ActivityDTO rhs) { return new CompareToBuilder().append(rhs.getTimestamp(), timestamp).append(rhs.getId(), id).toComparison(); }
From source file:com.hmsinc.epicenter.webapp.dto.KeyValueDTO.java
public int compareTo(KeyValueDTO g) { return new CompareToBuilder().append(value, g.getValue()).append(id, g.getId()).toComparison(); }
From source file:eu.debooy.sedes.domain.LandnaamDto.java
public int compareTo(LandnaamDto landnaamDto) { return new CompareToBuilder().append(landId, landnaamDto.landId).append(taal, landnaamDto.taal) .toComparison();/*from w w w. java2s .c o m*/ }
From source file:de.pro.dbw.navigation.history.api.HistoryNavigationModel.java
@Override public int compareTo(HistoryNavigationModel other) { return new CompareToBuilder().append(other.getGenerationTime(), this.getGenerationTime()) .append(other.getIdToOpen(), this.getIdToOpen()).toComparison(); }