Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 31 - 40 of 261 for comparators (0.34 seconds)

  1. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedMap.java

       * should be identical to the one the user passed in. We touch only the
       * "secret" comparator used by the delegate implementation.
       */
    
      private static <K, V> SortedMap<K, V> newModifiableDelegate(Comparator<? super K> comparator) {
        return newTreeMap(nullAccepting(comparator));
      }
    
      private static <E> Comparator<@Nullable E> nullAccepting(Comparator<E> comparator) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 08 18:10:02 GMT 2026
    - 16.6K bytes
    - Click Count (0)
  2. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

      public static <K, V> ImmutableSortedMap<K, V> copyOfSorted(SortedMap<K, ? extends V> map) {
        Comparator<? super K> comparator = map.comparator();
        if (comparator == null) {
          // If map has a null comparator, the keys should have a natural ordering,
          // even though K doesn't explicitly implement Comparable.
          comparator = (Comparator<? super K>) NATURAL_ORDER;
        }
        if (map instanceof ImmutableSortedMap) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 08 18:10:02 GMT 2026
    - 54.7K bytes
    - Click Count (0)
  3. guava/src/com/google/common/collect/ImmutableSortedMap.java

      public static <K, V> ImmutableSortedMap<K, V> copyOfSorted(SortedMap<K, ? extends V> map) {
        Comparator<? super K> comparator = map.comparator();
        if (comparator == null) {
          // If map has a null comparator, the keys should have a natural ordering,
          // even though K doesn't explicitly implement Comparable.
          comparator = (Comparator<? super K>) NATURAL_ORDER;
        }
        if (map instanceof ImmutableSortedMap) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 08 18:10:02 GMT 2026
    - 52.1K bytes
    - Click Count (0)
  4. android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java

        MIN_MAX {
          @Override
          public Queue<Integer> create(Comparator<Integer> comparator) {
            return MinMaxPriorityQueue.orderedBy(comparator).create();
          }
        },
        PRIORITY_QUEUE {
          @Override
          public Queue<Integer> create(Comparator<Integer> comparator) {
            return new PriorityQueue<>(11, comparator);
          }
        },
        INVERTED_MIN_MAX {
          @Override
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 4.4K bytes
    - Click Count (0)
  5. guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java

        MIN_MAX {
          @Override
          public Queue<Integer> create(Comparator<Integer> comparator) {
            return MinMaxPriorityQueue.orderedBy(comparator).create();
          }
        },
        PRIORITY_QUEUE {
          @Override
          public Queue<Integer> create(Comparator<Integer> comparator) {
            return new PriorityQueue<>(11, comparator);
          }
        },
        INVERTED_MIN_MAX {
          @Override
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 4.4K bytes
    - Click Count (0)
  6. guava/src/com/google/common/collect/ImmutableSortedMultiset.java

       * Comparator}.
       *
       * @throws NullPointerException if {@code comparator} or any of {@code elements} is null
       */
      public static <E> ImmutableSortedMultiset<E> copyOf(
          Comparator<? super E> comparator, Iterator<? extends E> elements) {
        checkNotNull(comparator);
        return new Builder<E>(comparator).addAll(elements).build();
      }
    
      /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Sep 22 21:07:18 GMT 2025
    - 29.5K bytes
    - Click Count (0)
  7. android/guava/src/com/google/common/collect/TreeMultiset.java

       * ClassCastException}.
       *
       * @param comparator the comparator that will be used to sort this multiset. A null value
       *     indicates that the elements' <i>natural ordering</i> should be used.
       */
      @SuppressWarnings("unchecked")
      public static <E extends @Nullable Object> TreeMultiset<E> create(
          @Nullable Comparator<? super E> comparator) {
        return (comparator == null)
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 13:11:08 GMT 2026
    - 34K bytes
    - Click Count (0)
  8. android/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,
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 10.9K bytes
    - Click Count (0)
  9. guava/src/com/google/common/collect/ComparatorOrdering.java

    import java.io.Serializable;
    import java.util.Comparator;
    import org.jspecify.annotations.Nullable;
    
    /** An ordering for a pre-existing comparator. */
    @GwtCompatible
    final class ComparatorOrdering<T extends @Nullable Object> extends Ordering<T>
        implements Serializable {
      final Comparator<T> comparator;
    
      ComparatorOrdering(Comparator<T> comparator) {
        this.comparator = checkNotNull(comparator);
      }
    
      @Override
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Jun 04 13:03:16 GMT 2025
    - 1.9K bytes
    - Click Count (0)
  10. android/guava/src/com/google/common/collect/GeneralRange.java

          Comparator<? super T> comparator, @ParametricNullness T endpoint, BoundType boundType) {
        return new GeneralRange<>(comparator, true, endpoint, boundType, false, null, OPEN);
      }
    
      /**
       * Returns everything below the endpoint relative to the specified comparator, with the specified
       * endpoint behavior.
       */
      static <T extends @Nullable Object> GeneralRange<T> upTo(
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Jul 08 18:32:10 GMT 2025
    - 10.8K bytes
    - Click Count (0)
Back to Top