Lines Matching defs:compareTo
32 * ordering</i>, and the class's {@code compareTo} method is referred to as
43 * with equals</i> if and only if {@code e1.compareTo(e2) == 0} has
46 * is not an instance of any class, and {@code e.compareTo(null)} should
59 * {@code (!a.equals(b) && a.compareTo(b) == 0)} to a sorted
73 * {(x, y) such that x.compareTo(y) <= 0}.
75 * {(x, y) such that x.compareTo(y) == 0}.
78 * It follows immediately from the contract for {@code compareTo} that the
103 * {@code sgn(x.compareTo(y)) == -sgn(y.compareTo(x))}
105 * implies that {@code x.compareTo(y)} must throw an exception iff
106 * {@code y.compareTo(x)} throws an exception.)
109 * {@code (x.compareTo(y) > 0 && y.compareTo(z) > 0)} implies
110 * {@code x.compareTo(z) > 0}.
112 * <p>Finally, the implementor must ensure that {@code x.compareTo(y)==0}
113 * implies that {@code sgn(x.compareTo(z)) == sgn(y.compareTo(z))}, for
117 * {@code (x.compareTo(y)==0) == (x.equals(y))}. Generally speaking, any
137 public int compareTo(T o);