Compares the two specified long values. The sign of the value returned is the same as that of ((Long) a).compareTo(b). Note for Java 7 and later: this method should be treated as deprecated; use the equivalent Long#compare method instead. @param a the first {@code
(long a, long b)
| 97 | |
| 98 | |
| 99 | public static int compare(long a, long b) { |
| 100 | return (a < b) ? -1 : ((a > b) ? 1 : 0); |
| 101 | } |
| 102 | |
| 103 | /** |
| 104 | * Returns {@code true} if {@code target} is present as an element anywhere in {@code array}. |