Home | History | Annotate | Download | only in util

Lines Matching refs:compare

47  * <tt>c.compare(e1, e2)==0</tt> has the same boolean value as
61 * {@code (a.equals(b) && c.compare(a, b) != 0)}
78 * {(x, y) such that c.compare(x, y) &lt;= 0}.
80 * {(x, y) such that c.compare(x, y) == 0}.
83 * It follows immediately from the contract for <tt>compare</tt> that the
121 * The implementor must ensure that <tt>sgn(compare(x, y)) ==
122 * -sgn(compare(y, x))</tt> for all <tt>x</tt> and <tt>y</tt>. (This
123 * implies that <tt>compare(x, y)</tt> must throw an exception if and only
124 * if <tt>compare(y, x)</tt> throws an exception.)<p>
127 * <tt>((compare(x, y)&gt;0) &amp;&amp; (compare(y, z)&gt;0))</tt> implies
128 * <tt>compare(x, z)&gt;0</tt>.<p>
130 * Finally, the implementor must ensure that <tt>compare(x, y)==0</tt>
131 * implies that <tt>sgn(compare(x, z))==sgn(compare(y, z))</tt> for all
135 * <tt>(compare(x, y)==0) == (x.equals(y))</tt>. Generally speaking,
150 int compare(T o1, T o2);
158 * <code>comp1.equals(comp2)</code> implies that <tt>sgn(comp1.compare(o1,
159 * o2))==sgn(comp2.compare(o1, o2))</tt> for every object reference
167 * @param obj the reference object with which to compare.
191 * {@code compare(a, b) == 0}, {@code other} is used to determine the order.
216 int res = compare(c1, c2);
217 return (res != 0) ? res : other.compare(c1, c2);
230 * @param keyComparator the {@code Comparator} used to compare the sort key
423 * @param keyComparator the {@code Comparator} used to compare the sort key
436 (c1, c2) -> keyComparator.compare(keyExtractor.apply(c1),
490 (c1, c2) -> Integer.compare(keyExtractor.applyAsInt(c1), keyExtractor.applyAsInt(c2));
511 (c1, c2) -> Long.compare(keyExtractor.applyAsLong(c1), keyExtractor.applyAsLong(c2));
532 (c1, c2) -> Double.compare(keyExtractor.applyAsDouble(c1), keyExtractor.applyAsDouble(c2));