Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 54 for comparators (0.28 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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
    - 47.2K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

        // The VarHandle, Unsafe, or Java implementation.
        Comparator<byte[]> comparator = UnsignedBytes.lexicographicalComparator();
        Helpers.testComparator(comparator, ordered);
        assertThat(SerializableTester.reserialize(comparator)).isSameInstanceAs(comparator);
    
        // The Java implementation.
        Comparator<byte[]> javaImpl = UnsignedBytes.lexicographicalComparatorJavaImpl();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Mar 08 01:43:32 GMT 2026
    - 14K 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-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)
  9. guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java

        assertMapEquals(copy, "two", 2, "three", 3, "one", 1);
        assertThat(ImmutableSortedMap.copyOf(copy, comparator)).isSameInstanceAs(copy);
        assertThat(copy.comparator()).isEqualTo(comparator);
      }
    
      public void testCopyOfImmutableSortedSetDifferentComparator() {
        Comparator<String> comparator = Ordering.<String>natural().reverse();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 29.8K bytes
    - Click Count (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/SafeTreeSet.java

      }
    
      @Override
      public void clear() {
        delegate.clear();
      }
    
      @Override
      public Comparator<? super E> comparator() {
        Comparator<? super E> comparator = delegate.comparator();
        if (comparator != null) {
          return comparator;
        }
        return NATURAL_ORDER;
      }
    
      @Override
      public boolean contains(Object object) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 18 18:06:14 GMT 2026
    - 5.7K bytes
    - Click Count (0)
Back to Top