- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 219 for Comparator (0.09 sec)
-
android/guava/src/com/google/common/collect/ComparatorOrdering.java
this.comparator = checkNotNull(comparator); } @Override public int compare(@ParametricNullness T a, @ParametricNullness T b) { return comparator.compare(a, b); } @Override public boolean equals(@CheckForNull Object object) { if (object == this) { return true; } if (object instanceof ComparatorOrdering) { ComparatorOrdering<?> that = (ComparatorOrdering<?>) object;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sun Jun 20 14:22:42 UTC 2021 - 1.9K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableSortedSet.java
@SuppressWarnings({"unchecked", "nullness"}) Comparator<@Nullable Object> unsafeComparator = (Comparator<@Nullable Object>) comparator; return unsafeComparator.compare(a, b); } final transient Comparator<? super E> comparator; ImmutableSortedSet(Comparator<? super E> comparator) { this.comparator = comparator; } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 36.9K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java
} @Override public void clear() { delegate.clear(); } @Override public Comparator<? super K> comparator() { Comparator<? super K> comparator = delegate.comparator(); if (comparator == null) { comparator = (Comparator<? super K>) NATURAL_ORDER; } return comparator; } @Override public boolean containsKey(Object key) { try {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Feb 20 17:00:05 UTC 2024 - 7.5K bytes - Viewed (0) -
guava/src/com/google/common/collect/SortedLists.java
Comparator<? super E> comparator, @ParametricNullness E key, List<? extends E> list, int foundIndex) { return FIRST_PRESENT.resultIndex(comparator, key, list, foundIndex) - 1; } }; abstract <E extends @Nullable Object> int resultIndex( Comparator<? super E> comparator, @ParametricNullness E key,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 11K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/Helpers.java
* the given {@code comparator}. * * @see #testComparator(Comparator, List) */ public static <T extends @Nullable Object> void testComparator( Comparator<? super T> comparator, T... valuesInExpectedOrder) { testComparator(comparator, asList(valuesInExpectedOrder)); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 17.5K bytes - Viewed (0) -
guava/src/com/google/common/collect/ForwardingSortedMap.java
@SuppressWarnings({"unchecked", "nullness"}) static int unsafeCompare( @CheckForNull Comparator<?> comparator, @CheckForNull Object o1, @CheckForNull Object o2) { if (comparator == null) { return ((Comparable<@Nullable Object>) o1).compareTo(o2); } else { return ((Comparator<@Nullable Object>) comparator).compare(o1, o2); } } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 12 15:26:39 UTC 2023 - 5.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/TreeMultisetTest.java
assertEquals("a", elementSet.last()); assertEquals(comparator, elementSet.comparator()); } public void testNullAcceptingComparator() throws Exception { Comparator<@Nullable String> comparator = Ordering.<String>natural().<String>nullsFirst(); TreeMultiset<@Nullable String> ms = TreeMultiset.create(comparator); ms.add("b"); ms.add(null); ms.add("a"); ms.add("b");
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 12.9K bytes - Viewed (0) -
guava/src/com/google/common/collect/Range.java
checkNotNull(values); if (values instanceof SortedSet) { SortedSet<C> set = (SortedSet<C>) values; Comparator<?> comparator = set.comparator(); if (Ordering.<C>natural().equals(comparator) || comparator == null) { return closed(set.first(), set.last()); } } Iterator<C> valueIterator = values.iterator();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 17:21:56 UTC 2024 - 27.8K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/SortedSetMultimap.java
*/ @Override Map<K, Collection<V>> asMap(); /** * Returns the comparator that orders the multimap values, with {@code null} indicating that * natural ordering is used. */ @CheckForNull Comparator<? super V> valueComparator();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Jan 24 17:47:51 UTC 2022 - 5.3K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/TopKSelector.java
* bufferSize ≥ k, then we can ignore any elements greater than this value. */ @CheckForNull private T threshold; @SuppressWarnings("unchecked") // TODO(cpovirk): Consider storing Object[] instead of T[]. private TopKSelector(Comparator<? super T> comparator, int k) { this.comparator = checkNotNull(comparator, "comparator"); this.k = k; checkArgument(k >= 0, "k (%s) must be >= 0", k);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 11.1K bytes - Viewed (0)