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.algoTrader.vo.ib.ScannerParameters.java
/** * @param object to compare this object against * @return int if equal/* w w w . j a v a2s.c o m*/ * @see Comparable#compareTo(Object) */ public int compareTo(final ScannerParameters object) { if (object == null) { return -1; } // Check if the same object instance if (object == this) { return 0; } return new CompareToBuilder().append(this.getXml(), object.getXml()).toComparison(); }
From source file:core.feature.userfeatureprofile.UserFeatureProfileDestinationProfile.java
public int compareTo(Object o) { UserFeatureProfileDestinationProfile rhs = (UserFeatureProfileDestinationProfile) o; return new CompareToBuilder().append(userFeatureProfile, rhs.userFeatureProfile) .append(destination, rhs.destination).append(schedule, rhs.schedule) .append(threshold, rhs.threshold).toComparison(); }
From source file:net.rrm.ehour.domain.BinaryConfiguration.java
public int compareTo(BinaryConfiguration object) { return new CompareToBuilder().append(this.getConfigKey(), object.getConfigKey()).toComparison(); }
From source file:com.xtructure.xsim.impl.SimpleXTime.java
/** * {@inheritDoc}/*from w w w .j a v a 2 s . com*/ */ @Override public final int compareTo(final XTime<F> other) { LOGGER.trace("begin {}.compareTo({})", new Object[] { getClass().getSimpleName(), other }); final int rval; if (other == null) { throw new NullPointerException("cannot compare to a null"); } rval = new CompareToBuilder() // .append(_tick, other.getTick()) // .append(_phase, other.getPhase()) // .toComparison(); LOGGER.trace("will return: {}", rval); LOGGER.trace("end {}.compareTo()", getClass().getSimpleName()); return rval; }
From source file:com.avdheshyadav.spiderdb.dbmodel.Trigger.java
/** * /* ww w .j ava2 s.c o m*/ */ public int compareTo(final Trigger other) { return new CompareToBuilder().append(name, other.name).append(table, other.table) .append(schema, other.schema).append(catalog, other.catalog).append(condition, other.condition) .append(statement, other.statement).append(actionOrder, other.actionOrder) .append(actionType, other.actionType).append(conditionTiming, other.conditionTiming) .append(eventType, other.eventType).toComparison(); }
From source file:com.healthmarketscience.jackcess.RowId.java
public int compareTo(RowId other) { return new CompareToBuilder().append(getType(), other.getType()) .append(getPageNumber(), other.getPageNumber()).append(getRowNumber(), other.getRowNumber()) .toComparison();/*ww w . java 2s. co m*/ }
From source file:edu.utah.further.ds.i2b2.model.impl.domain.ProviderDimensionPK.java
/** * @param o/*from w w w .j ava 2s.co m*/ * @return * @see java.lang.Comparable#compareTo(java.lang.Object) */ @Override public int compareTo(ProviderDimensionId that) { return new CompareToBuilder().append(this.getProviderId(), that.getProviderId()) .append(this.getProviderPath(), that.getProviderPath()).toComparison(); }
From source file:com.algoTrader.vo.ib.UpdateAccountTime.java
/** * @param object to compare this object against * @return int if equal/*from w ww. j a va 2 s. co m*/ * @see Comparable#compareTo(Object) */ public int compareTo(final UpdateAccountTime object) { if (object == null) { return -1; } // Check if the same object instance if (object == this) { return 0; } return new CompareToBuilder().append(this.getTimeStamp(), object.getTimeStamp()).toComparison(); }
From source file:edu.wisc.my.portlets.bookmarks.domain.compare.DefaultBookmarksComparator.java
/** * If both classes are not Bookmarks they are equal. If they are both * bookmarks they are compared by url then newWindow properties. *//*from w w w .j a v a 2 s . com*/ protected int compareBookmarks(final Entry e1, final Entry e2) { if (e1 instanceof Bookmark && e2 instanceof Bookmark) { final Bookmark b1 = (Bookmark) e1; final Bookmark b2 = (Bookmark) e2; return new CompareToBuilder().append(b1.getUrl(), b2.getUrl()) .append(b1.isNewWindow(), b2.isNewWindow()).toComparison(); } else { return 0; } }
From source file:com.avdheshyadav.spiderdb.dbmodel.Table.java
/** * // w w w . ja v a 2s.c o m */ public int compareTo(final Table other) { return new CompareToBuilder().append(tableType, other.tableType).append(name, other.name) .append(schema, other.schema).append(columnSet, other.columnSet) .append(primaryKey, other.primaryKey).append(indexSet, other.indexSet) .append(privilegeSet, other.privilegeSet).append(foreignKeys, other.foreignKeys).toComparison(); }