Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 219 for Comparator (0.12 sec)

  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) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 27 19:19:19 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  2. android/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 = ZERO_CUMULATIVE_COUNTS;
        this.offset = 0;
        this.length = 0;
      }
    
      RegularImmutableSortedMultiset(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/SortedIterables.java

        } else {
          return false;
        }
        return comparator.equals(comparator2);
      }
    
      @SuppressWarnings("unchecked")
      // if sortedSet.comparator() is null, the set must be naturally ordered
      public static <E extends @Nullable Object> Comparator<? super E> comparator(
          SortedSet<E> sortedSet) {
        Comparator<? super E> result = sortedSet.comparator();
        if (result == null) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 30 10:33:07 UTC 2021
    - 2K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java

      private static final Comparator<@Nullable Integer> DECREASING_INT_COMPARATOR =
          Ordering.<Integer>natural().reverse().<Integer>nullsFirst();
    
      private SetMultimap<String, Integer> create() {
        return TreeMultimap.create(StringLength.COMPARATOR, DECREASING_INT_COMPARATOR);
      }
    
      /** Create and populate a {@code TreeMultimap} with explicit comparators. */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/TreeBasedTable.java

      private final Comparator<? super C> columnComparator;
    
      private static class Factory<C, V> implements Supplier<Map<C, V>>, Serializable {
        final Comparator<? super C> comparator;
    
        Factory(Comparator<? super C> comparator) {
          this.comparator = comparator;
        }
    
        @Override
        public Map<C, V> get() {
          return new TreeMap<>(comparator);
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  6. 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) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 53K bytes
    - Viewed (0)
  7. 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(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/CompoundOrdering.java

      final Comparator<? super T>[] comparators;
    
      @SuppressWarnings("unchecked") // Generic array creation
      CompoundOrdering(Comparator<? super T> primary, Comparator<? super T> secondary) {
        this.comparators = (Comparator<? super T>[]) new Comparator<?>[] {primary, secondary};
      }
    
      @SuppressWarnings("unchecked") // Generic array creation
      CompoundOrdering(Iterable<? extends Comparator<? super T>> comparators) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/SortedMultisets.java

        }
    
        @Override
        public Iterator<E> iterator() {
          return Multisets.elementIterator(multiset().entrySet().iterator());
        }
    
        @Override
        public Comparator<? super E> comparator() {
          return multiset().comparator();
        }
    
        @Override
        public SortedSet<E> subSet(@ParametricNullness E fromElement, @ParametricNullness E toElement) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 01 17:18:04 UTC 2021
    - 5.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Ordering.java

       * there is no need to use this method.
       *
       * @param comparator the comparator that defines the order
       * @return comparator itself if it is already an {@code Ordering}; otherwise an ordering that
       *     wraps that comparator
       */
      @GwtCompatible(serializable = true)
      public static <T extends @Nullable Object> Ordering<T> from(Comparator<T> comparator) {
        return (comparator instanceof Ordering)
            ? (Ordering<T>) comparator
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.4K bytes
    - Viewed (0)
Back to top