Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 91 - 100 of 261 for comparators (0.15 seconds)

  1. android/guava-testlib/src/com/google/common/collect/testing/google/SortedSetMultimapAsMapTester.java

          assertEquals(multimap().valueComparator(), valueSet.comparator());
        }
      }
    
      public void testAsMapGetImplementsSortedSet() {
        for (K key : multimap().keySet()) {
          SortedSet<V> valueSet = (SortedSet<V>) multimap().asMap().get(key);
          assertEquals(multimap().valueComparator(), valueSet.comparator());
        }
      }
    
      @MapFeature.Require(SUPPORTS_REMOVE)
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Nov 14 23:40:07 GMT 2024
    - 2.4K bytes
    - Click Count (0)
  2. android/guava/src/com/google/common/collect/TopKSelector.java

       * bufferSize ≥ k, then we can ignore any elements greater than this value.
       */
      private @Nullable 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);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Aug 31 13:15:26 GMT 2025
    - 11.3K bytes
    - Click Count (0)
  3. guava/src/com/google/common/collect/RegularImmutableSortedMultiset.java

      private final transient long[] cumulativeCounts;
      private final transient int offset;
      private final transient int length;
    
      RegularImmutableSortedMultiset(Comparator<? super E> comparator) {
        this.elementSet = ImmutableSortedSet.emptySet(comparator);
        this.cumulativeCounts = zeroCumulativeCounts;
        this.offset = 0;
        this.length = 0;
      }
    
      RegularImmutableSortedMultiset(
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Dec 28 01:26:26 GMT 2024
    - 4.5K bytes
    - Click Count (0)
  4. guava/src/com/google/common/collect/RegularImmutableSortedSet.java

      Comparator<Object> unsafeComparator() {
        return (Comparator<Object>) comparator;
      }
    
      RegularImmutableSortedSet<E> getSubSet(int newFromIndex, int newToIndex) {
        if (newFromIndex == 0 && newToIndex == size()) {
          return this;
        } else if (newFromIndex < newToIndex) {
          return new RegularImmutableSortedSet<>(
              elements.subList(newFromIndex, newToIndex), comparator);
        } else {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Sep 22 21:07:18 GMT 2025
    - 9K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java

         */
        private static final int UNSET_EXPECTED_SIZE = -1;
    
        private final Comparator<B> comparator;
        private int expectedSize = UNSET_EXPECTED_SIZE;
        private int maximumSize = Integer.MAX_VALUE;
    
        private Builder(Comparator<B> comparator) {
          this.comparator = checkNotNull(comparator);
        }
    
        /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 13:11:08 GMT 2026
    - 34K bytes
    - Click Count (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilCommon.kt

      other: Array<String>?,
      comparator: Comparator<in String>,
    ): Boolean {
      if (isEmpty() || other == null || other.isEmpty()) {
        return false
      }
      for (a in this) {
        for (b in other) {
          if (comparator.compare(a, b) == 0) {
            return true
          }
        }
      }
      return false
    }
    
    internal fun Array<String>.indexOf(
      value: String,
      comparator: Comparator<String>,
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Mon May 05 16:01:00 GMT 2025
    - 10.1K bytes
    - Click Count (0)
  7. guava-tests/test/com/google/common/collect/ForwardingSortedMapTest.java

                    new TestStringSortedMapGenerator() {
                      private final Comparator<String> comparator = NullsBeforeTwo.INSTANCE;
    
                      @Override
                      protected SortedMap<String, String> create(Entry<String, String>[] entries) {
                        SortedMap<String, String> map = new SafeTreeMap<>(comparator);
                        for (Entry<String, String> entry : entries) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Jul 16 20:34:52 GMT 2025
    - 7.7K bytes
    - Click Count (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java

              Comparator<? super E> comparator = spliterator.getComparator();
              if (comparator == null) {
                // A sorted spliterator with no comparator is already using natural order.
                // (We could probably find a way to avoid rawtypes here if we wanted.)
                @SuppressWarnings({"unchecked", "rawtypes"})
                Comparator<? super E> naturalOrder =
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 12.5K bytes
    - Click Count (0)
  9. guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java

              Comparator<? super E> comparator = spliterator.getComparator();
              if (comparator == null) {
                // A sorted spliterator with no comparator is already using natural order.
                // (We could probably find a way to avoid rawtypes here if we wanted.)
                @SuppressWarnings({"unchecked", "rawtypes"})
                Comparator<? super E> naturalOrder =
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 12.1K bytes
    - Click Count (0)
  10. guava-testlib/src/com/google/common/collect/testing/testers/SortedMapNavigationTester.java

      public void testOrderedByComparator() {
        Comparator<? super K> comparator = navigableMap.comparator();
        if (comparator == null) {
          comparator = NATURAL_ORDER;
        }
        Iterator<Entry<K, V>> entryItr = navigableMap.entrySet().iterator();
        Entry<K, V> prevEntry = entryItr.next();
        while (entryItr.hasNext()) {
          Entry<K, V> nextEntry = entryItr.next();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 18 18:06:14 GMT 2026
    - 6.1K bytes
    - Click Count (0)
Back to Top