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:fr.xebia.demo.objectgrid.ticketing.Seat.java
public int compareTo(Seat other) { return new CompareToBuilder().append(this.number, other.number).toComparison(); }
From source file:bad.robot.bod.Pair.java
public int compareTo(Pair other) { return new CompareToBuilder().append(names.get(0), other.names.get(0).value()) .append(names.get(1), other.names.get(1).value()).toComparison(); }
From source file:edu.wisc.my.portlets.bookmarks.domain.compare.DefaultBookmarksComparator.java
public int compare(Entry e1, Entry e2) { return new CompareToBuilder().appendSuper(this.compareFolders(e1, e2)) .appendSuper(this.compareEntries(e1, e2)).appendSuper(this.compareBookmarks(e1, e2)).toComparison(); }
From source file:com.liveramp.megadesk.base.transaction.BaseVariableDependency.java
@Override public int compareTo(VariableDependency<VALUE> o) { return new CompareToBuilder().append(variable, o.variable()).toComparison(); }
From source file:eu.debooy.natuur.form.Gebied.java
public int compareTo(Gebied andere) { return new CompareToBuilder().append(gebiedId, andere.gebiedId).toComparison(); }
From source file:com.redhat.rhn.frontend.dto.EntitlementDto.java
/** * {@inheritDoc}/* ww w . j av a 2s.co m*/ */ public int compareTo(final Object other) { EntitlementDto castOther = (EntitlementDto) other; return new CompareToBuilder().append(entitlement, castOther.entitlement).toComparison(); }
From source file:eu.debooy.natuur.form.Taxonnaam.java
public int compareTo(Taxonnaam andere) { return new CompareToBuilder().append(taxonId, andere.taxonId).append(taal, andere.taal).toComparison(); }
From source file:eu.debooy.natuur.domain.FotoDto.java
public int compareTo(FotoDto fotoDto) { return new CompareToBuilder().append(fotoId, fotoDto.fotoId).toComparison(); }
From source file:com.twitter.hraven.TaskKey.java
/** * Compares two TaskKey objects on the basis of their taskId * * @param other/*from w ww .j av a 2 s . co m*/ * @return 0 if the taskIds are equal, * 1 if this taskId is greater than other taskId, * -1 if this taskId is less than other taskId */ @Override public int compareTo(Object other) { if (other == null) { return -1; } TaskKey otherKey = (TaskKey) other; return new CompareToBuilder().appendSuper(super.compareTo(otherKey)) .append(this.taskId, otherKey.getTaskId()).toComparison(); }
From source file:com.redhat.rhn.domain.entitlement.Entitlement.java
/** * {@inheritDoc}//from w w w . ja v a2 s . c om */ public int compareTo(final Object other) { Entitlement castOther = (Entitlement) other; return new CompareToBuilder().append(label, castOther.label).toComparison(); }