- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for hasSameComparator (0.07 sec)
-
android/guava-tests/test/com/google/common/collect/SortedIterablesTest.java
@NullMarked public class SortedIterablesTest extends TestCase { public void testSameComparator() { assertTrue(SortedIterables.hasSameComparator(Ordering.natural(), Sets.newTreeSet())); assertTrue(SortedIterables.hasSameComparator(Ordering.natural(), Maps.newTreeMap().keySet())); assertTrue( SortedIterables.hasSameComparator( Ordering.natural().reverse(), Sets.newTreeSet(Ordering.natural().reverse()))); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 14:50:24 UTC 2024 - 1.4K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedSet.java
Comparator<? super E> comparator, Iterable<? extends E> elements, boolean fromSortedSet) { checkNotNull(comparator); boolean hasSameComparator = fromSortedSet || hasSameComparator(elements, comparator); if (hasSameComparator && (elements instanceof ImmutableSortedSet)) { @SuppressWarnings("unchecked") ImmutableSortedSet<E> result = (ImmutableSortedSet<E>) elements; boolean isSubset =
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 18:32:41 UTC 2025 - 15.5K bytes - Viewed (0) -
guava/src/com/google/common/collect/SortedIterables.java
private SortedIterables() {} /** * Returns {@code true} if {@code elements} is a sorted collection using an ordering equivalent to * {@code comparator}. */ public static boolean hasSameComparator(Comparator<?> comparator, Iterable<?> elements) { checkNotNull(comparator); checkNotNull(elements); Comparator<?> comparator2; if (elements instanceof SortedSet) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableSortedSet.java
*/ public static <E> ImmutableSortedSet<E> copyOf( Comparator<? super E> comparator, Iterable<? extends E> elements) { checkNotNull(comparator); boolean hasSameComparator = SortedIterables.hasSameComparator(comparator, elements); if (hasSameComparator && (elements instanceof ImmutableSortedSet)) { @SuppressWarnings("unchecked") ImmutableSortedSet<E> original = (ImmutableSortedSet<E>) elements;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 36.8K bytes - Viewed (0)