Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for naturalOrder (0.14 sec)

  1. guava-tests/test/com/google/common/collect/ImmutableSortedMultisetTest.java

            ImmutableSortedMultiset.<String>naturalOrder().add("a").add("b").add("a").add("c").build();
        assertEquals(HashMultiset.create(asList("a", "b", "a", "c")), multiset);
      }
    
      public void testBuilderAddAll() {
        List<String> a = asList("a", "b");
        List<String> b = asList("c", "d");
        ImmutableSortedMultiset<String> multiset =
            ImmutableSortedMultiset.<String>naturalOrder().addAll(a).addAll(b).build();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/ImmutableSortedSet.java

      /**
       * Not supported. Use {@link #naturalOrder}, which offers better type-safety, instead. This method
       * exists only to hide {@link ImmutableSet#builder} from consumers of {@code ImmutableSortedSet}.
       *
       * @throws UnsupportedOperationException always
       * @deprecated Use {@link ImmutableSortedSet#naturalOrder}, which offers better type-safety.
       */
      @DoNotCall("Use naturalOrder")
      @Deprecated
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.1K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java

                @SuppressWarnings({"unchecked", "rawtypes"})
                Comparator<? super E> naturalOrder =
                    (Comparator<? super E>) Comparator.<Comparable>naturalOrder();
                comparator = naturalOrder;
              }
              assertTrue(Ordering.from(comparator).isOrdered(resultsForStrategy));
            }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java

                @SuppressWarnings({"unchecked", "rawtypes"})
                Comparator<? super E> naturalOrder =
                    (Comparator<? super E>) Comparator.<Comparable>naturalOrder();
                comparator = naturalOrder;
              }
              assertTrue(Ordering.from(comparator).isOrdered(resultsForStrategy));
            }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ImmutableSortedSet.java

      /**
       * Not supported. Use {@link #naturalOrder}, which offers better type-safety, instead. This method
       * exists only to hide {@link ImmutableSet#builder} from consumers of {@code ImmutableSortedSet}.
       *
       * @throws UnsupportedOperationException always
       * @deprecated Use {@link ImmutableSortedSet#naturalOrder}, which offers better type-safety.
       */
      @DoNotCall("Use naturalOrder")
      @Deprecated
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/ConnectionSpec.kt

        val tlsVersionsIntersection =
          if (tlsVersionsAsString != null) {
            sslSocket.enabledProtocols.intersect(tlsVersionsAsString, naturalOrder())
          } else {
            sslSocket.enabledProtocols
          }
    
        // In accordance with https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00 the SCSV
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java

        // Hack around E not being a subtype of Comparable.
        // Unsafe, see ImmutableSortedMultisetFauxverideShim.
        @SuppressWarnings("unchecked")
        Ordering<E> naturalOrder = (Ordering<E>) Ordering.<Comparable<?>>natural();
        return copyOf(naturalOrder, elements);
      }
    
      /**
       * Returns an immutable sorted multiset containing the given elements sorted by their natural
       * ordering.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 35.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java

        assertThat(set).containsExactly(101, 12, 3, 44).inOrder();
      }
    
      @Override
      <E extends Comparable<E>> ImmutableSortedSet.Builder<E> builder() {
        return ImmutableSortedSet.naturalOrder();
      }
    
      @Override
      int getComplexBuilderSetLastElement() {
        return 0x00FFFFFF;
      }
    
      public void testLegacyComparable_of() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 46.7K bytes
    - Viewed (0)
  9. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedSet.java

      }
    
      private static final Comparator<?> NATURAL_ORDER = Ordering.natural();
    
      // TODO(b/345814817): Move this to RegularImmutableSortedSet?
      @SuppressWarnings({"unchecked", "ClassInitializationDeadlock"})
      private static final ImmutableSortedSet<Object> NATURAL_EMPTY_SET =
          new RegularImmutableSortedSet<Object>(
              new TreeSet<Object>((Comparator<Object>) NATURAL_ORDER), false);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Aug 19 16:21:24 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  10. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedMap.java

                  + " and "
                  + key
                  + "="
                  + value);
        }
        map.put(key, value);
      }
    
      public static <K extends Comparable<?>, V> Builder<K, V> naturalOrder() {
        return new Builder<K, V>(Ordering.natural());
      }
    
      public static <K, V> Builder<K, V> orderedBy(Comparator<K> comparator) {
        return new Builder<K, V>(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)
Back to top