Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 107 for comparators (0.27 seconds)

  1. guava/src/com/google/common/collect/Comparators.java

          Comparator<T> comparator) {
        return new LexicographicalOrdering<S>(checkNotNull(comparator));
      }
    
      /**
       * Returns {@code true} if each element in {@code iterable} after the first is greater than or
       * equal to the element that preceded it, according to the specified comparator. Note that this is
       * always true when the iterable has fewer than two elements.
       */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 19:19:10 GMT 2026
    - 10.9K bytes
    - Click Count (0)
  2. android/guava/src/com/google/common/collect/Comparators.java

          Comparator<T> comparator) {
        return new LexicographicalOrdering<S>(checkNotNull(comparator));
      }
    
      /**
       * Returns {@code true} if each element in {@code iterable} after the first is greater than or
       * equal to the element that preceded it, according to the specified comparator. Note that this is
       * always true when the iterable has fewer than two elements.
       */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 19:19:10 GMT 2026
    - 11.5K bytes
    - Click Count (0)
  3. guava/src/com/google/common/collect/Ordering.java

       *
       * @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
       */
      public static <T extends @Nullable Object> Ordering<T> from(Comparator<T> comparator) {
        return (comparator instanceof Ordering)
            ? (Ordering<T>) comparator
            : new ComparatorOrdering<T>(comparator);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 19:19:10 GMT 2026
    - 39.4K bytes
    - Click Count (0)
  4. android/guava/src/com/google/common/collect/Ordering.java

       *
       * @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
       */
      public static <T extends @Nullable Object> Ordering<T> from(Comparator<T> comparator) {
        return (comparator instanceof Ordering)
            ? (Ordering<T>) comparator
            : new ComparatorOrdering<T>(comparator);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 19:19:10 GMT 2026
    - 39.4K bytes
    - Click Count (0)
  5. 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. */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 8.4K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/collect/TreeMultimapNaturalTest.java

        assertEquals(multimap, copy);
      }
    
      private static final Comparator<Double> KEY_COMPARATOR = Ordering.natural();
    
      private static final Comparator<Double> VALUE_COMPARATOR =
          Ordering.<Double>natural().reverse().nullsFirst();
    
      /**
       * Test that creating one TreeMultimap from another does not copy the comparators from the source
       * TreeMultimap.
       */
      public void testCreateFromTreeMultimap() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 22.5K bytes
    - Click Count (0)
  7. android/guava-tests/test/com/google/common/collect/TreeMultimapNaturalTest.java

        assertEquals(multimap, copy);
      }
    
      private static final Comparator<Double> KEY_COMPARATOR = Ordering.natural();
    
      private static final Comparator<Double> VALUE_COMPARATOR =
          Ordering.<Double>natural().reverse().nullsFirst();
    
      /**
       * Test that creating one TreeMultimap from another does not copy the comparators from the source
       * TreeMultimap.
       */
      public void testCreateFromTreeMultimap() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 22.5K bytes
    - Click Count (0)
  8. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

      /**
       * Creates a {@code MonitorBasedPriorityBlockingQueue} with the specified initial capacity that
       * orders its elements according to the specified comparator.
       *
       * @param initialCapacity the initial capacity for this priority queue
       * @param comparator the comparator that will be used to order this priority queue. If {@code
       *     null}, the {@linkplain Comparable natural ordering} of the elements will be used.
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 23 21:06:42 GMT 2026
    - 19K bytes
    - Click Count (0)
  9. guava/src/com/google/common/collect/StandardTable.java

      Iterator<C> createColumnKeyIterator() {
        return new ColumnKeyIterator();
      }
    
      private final class ColumnKeyIterator extends AbstractIterator<C> {
        // Use the same map type to support TreeMaps with comparators that aren't
        // consistent with equals().
        final Map<C, V> seen = factory.get();
        final Iterator<Map<C, V>> mapIterator = backingMap.values().iterator();
        Iterator<Entry<C, V>> entryIterator = emptyIterator();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Mar 08 16:16:42 GMT 2026
    - 30.4K bytes
    - Click Count (0)
  10. android/guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java

        Comparator<Comparable<?>> comparator = Ordering.natural().reverse();
        SortedSet<String> set =
            new ImmutableSortedSet.Builder<String>(comparator).add("a", "b", "c").build();
        SortedSet<String> copy = SerializableTester.reserializeAndAssert(set);
        assertTrue(elementsEqual(set, copy));
        assertEquals(set.comparator(), copy.comparator());
      }
    
      public void testReverseOrder() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 46.3K bytes
    - Click Count (0)
Back to Top