Lines Matching refs:compareTo
32 * ordering</i>, and the class's <tt>compareTo</tt> method is referred to as
43 * with equals</i> if and only if <tt>e1.compareTo(e2) == 0</tt> has
46 * is not an instance of any class, and <tt>e.compareTo(null)</tt> should
59 * <tt>(!a.equals(b) && a.compareTo(b) == 0)</tt> 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 <tt>compareTo</tt> that the
103 * <p>The implementor must ensure <tt>sgn(x.compareTo(y)) ==
104 * -sgn(y.compareTo(x))</tt> for all <tt>x</tt> and <tt>y</tt>. (This
105 * implies that <tt>x.compareTo(y)</tt> must throw an exception iff
106 * <tt>y.compareTo(x)</tt> throws an exception.)
109 * <tt>(x.compareTo(y)>0 && y.compareTo(z)>0)</tt> implies
110 * <tt>x.compareTo(z)>0</tt>.
112 * <p>Finally, the implementor must ensure that <tt>x.compareTo(y)==0</tt>
113 * implies that <tt>sgn(x.compareTo(z)) == sgn(y.compareTo(z))</tt>, for
117 * <tt>(x.compareTo(y)==0) == (x.equals(y))</tt>. Generally speaking, any
137 public int compareTo(T o);