- Sort Score
- Num 10 results
- Language All
Results 71 - 80 of 455 for compareOp (0.06 seconds)
-
guava-tests/test/com/google/common/collect/OrderingTest.java
} public void testExplicit_two() { Comparator<Integer> c = Ordering.explicit(42, 5); assertEquals(0, c.compare(5, 5)); assertTrue(c.compare(5, 42) > 0); assertTrue(c.compare(42, 5) < 0); IncomparableValueException expected = assertThrows(IncomparableValueException.class, () -> c.compare(5, 666)); assertEquals(666, expected.value); new EqualsTester()
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Fri Oct 10 23:13:45 GMT 2025 - 42.8K bytes - Click Count (0) -
guava/src/com/google/common/collect/TreeMultimap.java
/** * Implementation of {@code Multimap} whose keys and values are ordered by their natural ordering or * by supplied comparators. In all cases, this implementation uses {@link Comparable#compareTo} or * {@link Comparator#compare} instead of {@link Object#equals} to determine equivalence of * instances. * * <p><b>Warning:</b> The comparators or comparables used must be <i>consistent with equals</i> asCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 8.5K bytes - Click Count (0) -
android/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java
@SuppressWarnings("unchecked") // The null value can compare with any Object Comparable<Object> comparable = ArbitraryInstances.get(Comparable.class); assertEquals(0, comparable.compareTo(comparable)); assertThat(comparable.compareTo("")).isGreaterThan(0); assertThrows(NullPointerException.class, () -> comparable.compareTo(null)); } public void testGet_array() {Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 11 20:45:32 GMT 2025 - 22.2K bytes - Click Count (0) -
guava/src/com/google/common/collect/TreeMultiset.java
/** * A multiset which maintains the ordering of its elements, according to either their natural order * or an explicit {@link Comparator}. In all cases, this implementation uses {@link * Comparable#compareTo} or {@link Comparator#compare} instead of {@link Object#equals} to determine * equivalence of instances. * * <p><b>Warning:</b> The comparison must be <i>consistent with equals</i> as explained by theCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Dec 09 15:58:48 GMT 2025 - 34.3K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java
@SuppressWarnings("unchecked") private static final Comparator<Object> NATURAL_ORDER = new Comparator<Object>() { @Override public int compare(Object o1, Object o2) { return ((Comparable<Object>) o1).compareTo(o2); } }; private final NavigableMap<K, V> delegate; public SafeTreeMap() { this(new TreeMap<K, V>()); }Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Feb 13 17:34:21 GMT 2025 - 7.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/math/DoubleMathTest.java
for (RoundingMode mode : ALL_SAFE_ROUNDING_MODES) { BigDecimal expected = new BigDecimal(d).setScale(0, mode); boolean isInBounds = expected.compareTo(MAX_INT_AS_BIG_DECIMAL) <= 0 & expected.compareTo(MIN_INT_AS_BIG_DECIMAL) >= 0; try { assertEquals(expected.intValue(), DoubleMath.roundToInt(d, mode)); assertTrue(isInBounds);
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Oct 30 14:15:36 GMT 2025 - 27.3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/reflect/SubtypeTester.java
Method[] methods = getClass().getMethods(); Arrays.sort( methods, new Comparator<Method>() { @Override public int compare(Method a, Method b) { return a.getName().compareTo(b.getName()); } }); for (Method method : methods) { if (method.isAnnotationPresent(TestSubtype.class)) { method.setAccessible(true);
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Nov 25 23:29:58 GMT 2025 - 6.2K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/TreeMultisetTest.java
} public void testCustomComparator() throws Exception { Comparator<String> comparator = new Comparator<String>() { @Override public int compare(String o1, String o2) { return o2.compareTo(o1); } }; TreeMultiset<String> ms = TreeMultiset.create(comparator); ms.add("b"); ms.add("c"); ms.add("a"); ms.add("b");
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 13K bytes - Click Count (0) -
guava/src/com/google/common/math/BigIntegerMath.java
*/ do { approxLog10--; approxPow = approxPow.divide(BigInteger.TEN); approxCmp = approxPow.compareTo(x); } while (approxCmp > 0); } else { BigInteger nextPow = BigInteger.TEN.multiply(approxPow); int nextCmp = nextPow.compareTo(x); while (nextCmp <= 0) { approxLog10++; approxPow = nextPow; approxCmp = nextCmp;Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 18.8K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MapGenerators.java
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sun Aug 10 19:54:19 GMT 2025 - 8.6K bytes - Click Count (0)