Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 118 for Comparator (0.09 sec)

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

        @Override
        protected List<String> create(String[] elements) {
          Comparator<String> comparator = createExplicitComparator(elements);
          ImmutableSet<String> set = ImmutableSortedSet.copyOf(comparator, asList(elements));
          return set.asList();
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  2. 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)
  3. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

     * elements are in the same order as in this.
     */
    internal fun Array<String>.intersect(
      other: Array<String>,
      comparator: Comparator<in String>,
    ): Array<String> {
      val result = mutableListOf<String>()
      for (a in this) {
        for (b in other) {
          if (comparator.compare(a, b) == 0) {
            result.add(a)
            break
          }
        }
      }
      return result.toTypedArray()
    }
    
    /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon May 13 13:42:37 UTC 2024
    - 11K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/TreeMultiset.java

        // reading data stored by writeObject
        Comparator<? super E> comparator = (Comparator<? super E>) requireNonNull(stream.readObject());
        Serialization.getFieldSetter(AbstractSortedMultiset.class, "comparator").set(this, comparator);
        Serialization.getFieldSetter(TreeMultiset.class, "range")
            .set(this, GeneralRange.all(comparator));
        Serialization.getFieldSetter(TreeMultiset.class, "rootReference")
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 34.1K bytes
    - Viewed (0)
  5. 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,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 11K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Collections2.java

          Iterable<E> elements, Comparator<? super E> comparator) {
        return new OrderedPermutationCollection<E>(elements, comparator);
      }
    
      private static final class OrderedPermutationCollection<E> extends AbstractCollection<List<E>> {
        final ImmutableList<E> inputList;
        final Comparator<? super E> comparator;
        final int size;
    
        OrderedPermutationCollection(Iterable<E> input, Comparator<? super E> comparator) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  7. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedSet.java

        private final Comparator<? super E> comparator;
    
        public Builder(Comparator<? super E> comparator) {
          this.comparator = checkNotNull(comparator);
        }
    
        Builder(Comparator<? super E> comparator, int expectedSize) {
          super(expectedSize);
          this.comparator = checkNotNull(comparator);
        }
    
        @CanIgnoreReturnValue
        @Override
        public Builder<E> add(E element) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Aug 19 16:21:24 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  8. 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);
        }
    
        /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 34.1K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top