compare
Compares the two specified double values. The sign of the integer value returned is the same as that of the integer that would be returned by the call:
Double.valueOf(d1).compareTo(Double.valueOf(d2))*
Return
the value 0 if d1 is numerically equal to d2; a value less than 0 if d1 is numerically less than d2; and a value greater than 0 if d1 is numerically greater than d2.
Since
1.4
Parameters
the first double to compare
the second double to compare
Compares the two specified float values. The sign of the integer value returned is the same as that of the integer that would be returned by the call:
Float.valueOf(f1).compareTo(Float.valueOf(f2))*
Return
the value 0 if f1 is numerically equal to f2; a value less than 0 if f1 is numerically less than f2; and a value greater than 0 if f1 is numerically greater than f2.
Since
1.4
Parameters
the first float to compare.
the second float to compare.
Compares two Int values numerically.
This is the same as the Java method Integer.compare(int x, int y).
Return
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
Parameters
the first value to compare
the second value to compare
Compares two long values numerically. The value returned is identical to what would be returned by:
Long.valueOf(x).compareTo(Long.valueOf(y))*
Return
the value 0 if x == y; a value less than 0 if x < y; and a value greater than 0 if x > y
Since
1.7
Parameters
the first long to compare
the second long to compare
Compares two short values numerically. The value returned is identical to what would be returned by:
Short.valueOf(x).compareTo(Short.valueOf(y))
Return
the value 0 if x == y; a value less than 0 if x < y; and a value greater than 0 if x > y
Since
1.7
Parameters
the first short to compare
the second short to compare