Compares two JobKey QualifiedJobId

@param other
@return 0 if the Qualified Job Ids are equal,
1 if this QualifiedJobId greater than other QualifiedJobId,
-1 if this QualifiedJobId is less than other QualifiedJobId
421746
@Override
  public int compareTo(Object other) {
    if (other == null) {
      return -1;
    }
    JobKey otherKey = (JobKey)other;
    return new CompareToBuilder().appendSuper(super.compareTo(otherKey))
        .append(this.jobId, otherKey.getJobId())
        .toComparison();
  }
1325227
public int compareTo(Shard other) {
    // compare version
    if (version < other.version) {
      return -1;
    } else if (version > other.version) {
      return 1;
    }
    // compare dir
    int result = dir.compareTo(other.dir);
    if (result != 0) {
      return result;
    }
    // compare gen
    if (gen < other.gen) {
      return -1;
    } else if (gen == other.gen) {
      return 0;
    } else {
      return 1;
    }
  }
995711
public boolean canMergeRemainderOrdering(OrderingScore<S> other) {
        if (this == other || (getHandledCount() == 0 && other.getHandledCount() == 0)) {
            return true;
        }

        if (isIndexClustered() == other.isIndexClustered()
            && getIndexPropertyCount() == other.getIndexPropertyCount()
            && shouldReverseOrder() == other.shouldReverseOrder()
            && getHandledOrdering().equals(other.getHandledOrdering()))
        {
            // The remainder orderings cannot conflict.
            OrderingList<S> thisRemainderOrdering = getRemainderOrdering();
            OrderingList<S> otherRemainderOrdering = other.getRemainderOrdering();

            int size = Math.min(thisRemainderOrdering.size(), otherRemainderOrdering.size());
            for (int i=0; i<size; i++) {
                if (!thisRemainderOrdering.get(i).equals(otherRemainderOrdering.get(i))) {
                    return false;
                }
            }

            return true;
        }

        return false;
    }
40345
@Override
	public boolean isPrevJobNotEq(String actualJob) {
		if (LOGGER.isTraceEnabled()) LOGGER.trace(String.format("check job prev: %s, act: %s", this.prevJob, actualJob));
		return StringUtils.isEmpty(this.prevJob) || !actualJob.equals(this.prevJob);
	}
922959
public static int compare(Term self, Term other) {

		// Sanity check.
		if (self == null || other == null) {
			throw new NullPointerException();
		}

		// Identical objects are always equal.
		if (self == other) {
			return 0;
		}

		// Easy case is when they are not the same type of term.
		if (self.isKey() != other.isKey()) {
			return (self.isKey()) ? 1 : -1;
		}

		// Compare the underlying values.
		try {
			if (self.isKey()) {
				return self.getKey().compareTo(other.getKey());
			} else {
				return self.getIndex().compareTo(other.getIndex());
			}
		} catch (InvalidTermException consumed) {
			// This statement can never be reached because both objects are
			// either keys or indexes. This try/catch block is only here to make
			// the compiler happy.
			assert (false);
			return 0;
		}
	}
1212606
@Override
    public int compareTo(Task<R> another) {
        int me = Constants.PRIORITY_MAP[priority&Constants.PRIORITY_MASK];
        int you = Constants.PRIORITY_MAP[another.priority&Constants.PRIORITY_MASK];
        return me == you ?
                seqNumber - another.seqNumber :
                you - me;
    }
1220613
public int compare(final Object a, final Object b) {

        final long awhen = ((Task) (a)).getNextScheduled();
        final long bwhen = ((Task) (b)).getNextScheduled();

        return (awhen < bwhen) ? -1
                               : (awhen == bwhen) ? 0
                                                  : 1;
    }
152576
public int compare(Version other) {
        if (other == null) throw new NullPointerException("other version is null");
        if (this._version < other._version) return -1;
        if (this._version > other._version) return 1;
        if (this._revision < other._revision) return -1;
        if (this._revision > other._revision) return 1;
        if (this._subrevision < other._subrevision) return -1;
        if (this._subrevision > other._subrevision) return 1;
        return 0;
    }
1372050
public ORDER compare(OQueryOperator other) {
    final Class<?> thisClass = this.getClass();
    final Class<?> otherClass = other.getClass();

    int thisPosition = -1;
    int otherPosition = -1;
    for (int i = 0; i < DEFAULT_OPERATORS_ORDER.length; i++) {
      // subclass of default operators inherit their parent ordering
      final Class<?> clazz = DEFAULT_OPERATORS_ORDER[i];
      if (clazz.isAssignableFrom(thisClass)) {
        thisPosition = i;
      }
      if (clazz.isAssignableFrom(otherClass)) {
        otherPosition = i;
      }
    }

    if (thisPosition == -1 || otherPosition == -1) {
      // can not decide which comes first
      return ORDER.UNKNOWNED;
    }

    if (thisPosition > otherPosition) {
      return ORDER.AFTER;
    } else if (thisPosition < otherPosition) {
      return ORDER.BEFORE;
    }

    return ORDER.EQUAL;
  }
900322
@Override
    public int compareTo(ClassHash other) {
        int cmp = MethodHash.compareHashes(this.classHash, other.classHash);
        // System.out.println(this + " <=> " + other + ": compareTo=" + cmp);
        return cmp;
    }
1012410
@Override
    public int compareTo(@NonNull Operation another) {
        return another.definedPriority().priority - definedPriority().priority;
    }
184158
@Override
    public int compareTo(final MutableInt other) {
        return (this.value > other.value) ? 1 : ((this.value == other.value) ? 0 : -1);
    }
1104107
@Override
    public int compareTo(final FieldInfo other) {
        final int diff = declaringClassName.compareTo(other.declaringClassName);
        if (diff != 0) {
            return diff;
        }
        return name.compareTo(other.name);
    }
1167123
public int compareTo(final HttpString other) {
        if(orderInt != 0 && other.orderInt != 0) {
            return signum(orderInt - other.orderInt);
        }
        final int len = Math.min(bytes.length, other.bytes.length);
        int res;
        for (int i = 0; i < len; i++) {
            res = signum(higher(bytes[i]) - higher(other.bytes[i]));
            if (res != 0) return res;
        }
        // shorter strings sort higher
        return signum(bytes.length - other.bytes.length);
    }
658456
@Override
    public int compareTo(final ModuleInfo other) {
        final int diff = this.name.compareTo(other.name);
        if (diff != 0) {
            return diff;
        }
        final URI thisLoc = this.getLocation();
        final URI otherLoc = other.getLocation();
        if (thisLoc != null && otherLoc != null) {
            return thisLoc.compareTo(otherLoc);
        }
        return 0;
    }
251732
@Override
  public int compareTo(org.apache.hadoop.mapreduce.ID o) {
    JVMId that = (JVMId)o;
    int jobComp = this.jobId.compareTo(that.jobId);
    if(jobComp == 0) {
      if(this.isMap == that.isMap) {
        return this.id - that.id;
      } else {
        return this.isMap ? -1 : 1;
      }
    } else {
      return jobComp;
    }
  }
60971
public int compareSwappedTo(IntIntPair other) {
    int fdiff = this.second - other.second;
    if(fdiff != 0) {
      return fdiff;
    }
    return this.first - other.first;
  }