Compares this mutable to another in ascending order.

@param other  the other mutable to compare to, not null
@return negative if this is less, zero if equal, positive if greater
968210
@Override
    public int compareTo(final MutableByte other) {
        return (this.value > other.value) ? 1 : ((this.value == other.value) ? 0 : -1);
    }
685542
@Override
  public int compareTo(DoubleIntPair other) {
    int fdiff = Double.compare(this.first, other.first);
    if(fdiff != 0) {
      return fdiff;
    }
    return this.second - other.second;
  }
1275608
@Override
    public int compareTo(IntsRef other) {
        if (this == other) return 0;
        final int[] aInts = this.ints;
        int aUpto = this.offset;
        final int[] bInts = other.ints;
        int bUpto = other.offset;
        final int aStop = aUpto + Math.min(this.length, other.length);
        while (aUpto < aStop) {
            int aInt = aInts[aUpto++];
            int bInt = bInts[bUpto++];
            if (aInt > bInt) {
                return 1;
            } else if (aInt < bInt) {
                return -1;
            }
        }
        // One is a prefix of the other, or, they are equal:
        return this.length - other.length;
    }
1052653
public int compareIntervalOrder(Interval<E> other)
  {
    int flags = getRelationFlags(other);
    if (checkFlagExclusiveSet(flags, REL_FLAGS_INTERVAL_BEFORE, REL_FLAGS_INTERVAL_UNKNOWN)) {
      return -1;
    } else if (checkFlagExclusiveSet(flags, REL_FLAGS_INTERVAL_AFTER, REL_FLAGS_INTERVAL_UNKNOWN)) {
      return 1;
    } else {
      return 0;
    }
  }
452508
@Override
	public int compareTo(BinaryString other) {

		if (javaObject != null && other.javaObject != null) {
			return javaObject.compareTo(other.javaObject);
		}

		ensureMaterialized();
		other.ensureMaterialized();
		if (segments.length == 1 && other.segments.length == 1) {

			int len = Math.min(sizeInBytes, other.sizeInBytes);
			MemorySegment seg1 = segments[0];
			MemorySegment seg2 = other.segments[0];

			for (int i = 0; i < len; i++) {
				int res = (seg1.get(offset + i) & 0xFF) - (seg2.get(other.offset + i) & 0xFF);
				if (res != 0) {
					return res;
				}
			}
			return sizeInBytes - other.sizeInBytes;
		}

		// if there are multi segments.
		return compareMultiSegments(other);
	}
1263685
public int compareSwappedTo(DoubleIntPair other) {
    int fdiff = this.second - other.second;
    if(fdiff != 0) {
      return fdiff;
    }
    return Double.compare(this.second, other.second);
  }
22727
public static int typeCompareTo(Writable one, Writable other) {
        PrimitiveObject noOne = hadoop2Primitive(one);
        PrimitiveObject noOther = hadoop2Primitive(other);
        if (noOne.getType() != noOther.getType()) {
            return -1;
        }

        return 0;
    }
497860
public int compareTo(NameValuePair<T> other) {
        String otherName = other.mName;

        if (mName == null) {
            return otherName == null ? 0 : 1;
        }

        if (otherName == null) {
            return -1;
        }

        return mName.compareToIgnoreCase(otherName);
    }
836161
private static int compareInt(final int a, final int b) {
		int result = 0;
		if (a > b) {
			result = 1;
		} else if (a < b) {
			result = -1;
		}
		return result;
	}
909967
public int compareTo(Piece other) {
    // return true for the same pieces, otherwise sort by time seen, then by index;
    if (this.equals(other)) {
      return 0;
    } else if (this.seen == other.seen) {
      return new Integer(this.index).compareTo(other.index);
    } else if (this.seen < other.seen) {
      return -1;
    } else {
      return 1;
    }
  }
735428
public /*@ pure @*/ int cmp(FDBigInteger other) {
        int aSize = nWords + offset;
        int bSize = other.nWords + other.offset;
        if (aSize > bSize) {
            return 1;
        } else if (aSize < bSize) {
            return -1;
        }
        int aLen = nWords;
        int bLen = other.nWords;
        while (aLen > 0 && bLen > 0) {
            int a = data[--aLen];
            int b = other.data[--bLen];
            if (a != b) {
                return ((a & LONG_MASK) < (b & LONG_MASK)) ? -1 : 1;
            }
        }
        if (aLen > 0) {
            return checkZeroTail(data, aLen);
        }
        if (bLen > 0) {
            return -checkZeroTail(other.data, bLen);
        }
        return 0;
    }
877505
public static int compare(Integer n1, Integer n2)
   {
      int result;
      if (n1 == null || n2 == null)
      {
         result = (n1 == null && n2 == null ? 0 : (n1 == null ? 1 : -1));
      }
      else
      {
         result = n1.compareTo(n2);
      }
      return (result);
   }
539374
@Nullable
    public T orElse(@Nullable T other) {
        return value != null ? value : other;
    }
1336024
public boolean lessThan(Object left, Object right) {
    if ((left == right) || (left == null) || (right == null)) {
      return false;
    }
    else {
      return compare(left, right, "<") < 0;
    }

  }
43824
@Override
	public int compareTo(IntValue o) {
		final int other = o.value;
		return this.value < other ? -1 : this.value > other ? 1 : 0;
	}
1082556
@Override
	public int compareTo(ResidueNumber other) {

		// chain id
		if (chainName != null && other.chainName != null) {
			if (!chainName.equals(other.chainName)) return chainName.compareTo(other.chainName);
		}
		if (chainName != null && other.chainName == null) {
			return 1;
		} else if (chainName == null && other.chainName != null) {
			return -1;
		}

		return compareToPositional(other);
	}
1052359
@Override
	public int compareTo(CharValue o) {
		final int other = o.value;
		return this.value < other ? -1 : this.value > other ? 1 : 0;
	}