Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 215 for natural (0.64 sec)

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

        assertTrue(Comparators.isInOrder(Collections.singleton(1), Ordering.natural()));
        assertTrue(Comparators.isInOrder(Collections.<Integer>emptyList(), Ordering.natural()));
      }
    
      public void testIsInStrictOrder() {
        assertFalse(Comparators.isInStrictOrder(asList(5, 3, 0, 9), Ordering.natural()));
        assertFalse(Comparators.isInStrictOrder(asList(0, 5, 3, 9), Ordering.natural()));
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Apr 11 08:42:51 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/TreeMultimap.java

      /**
       * Creates an empty {@code TreeMultimap} ordered by the natural ordering of its keys and values.
       */
      @SuppressWarnings("rawtypes") // https://github.com/google/guava/issues/989
      public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create() {
        return new TreeMultimap<>(Ordering.natural(), Ordering.natural());
      }
    
      /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Sat Mar 09 00:21:17 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableSortedMap.java

      private static final Comparator<?> NATURAL_ORDER = Ordering.natural();
    
      private static final ImmutableSortedMap<Comparable<?>, Object> NATURAL_EMPTY_MAP =
          new ImmutableSortedMap<>(
              ImmutableSortedSet.emptySet(Ordering.natural()), ImmutableList.<Object>of());
    
      static <K, V> ImmutableSortedMap<K, V> emptyMap(Comparator<? super K> comparator) {
        if (Ordering.natural().equals(comparator)) {
          return of();
        } else {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 50.3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/SortedIterablesTest.java

        // Before JDK6 (including under GWT), the TreeMap keySet is a plain Set.
        if (Maps.newTreeMap().keySet() instanceof SortedSet) {
          assertTrue(SortedIterables.hasSameComparator(Ordering.natural(), Maps.newTreeMap().keySet()));
        }
        assertTrue(
            SortedIterables.hasSameComparator(
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Feb 19 20:34:55 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/ImmutableSortedMultiset.java

       * ordering.
       *
       * @throws NullPointerException if any element is null
       */
      public static <E extends Comparable<? super E>> ImmutableSortedMultiset<E> of(E e1, E e2, E e3) {
        return copyOf(Ordering.natural(), Arrays.asList(e1, e2, e3));
      }
    
      /**
       * Returns an immutable sorted multiset containing the given elements sorted by their natural
       * ordering.
       *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 08 03:01:02 UTC 2024
    - 29.5K bytes
    - Viewed (0)
  6. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedSet.java

      }
    
      public static <E extends Comparable<? super E>> ImmutableSortedSet<E> of(E e1) {
        return ofInternal(Ordering.natural(), e1);
      }
    
      @SuppressWarnings("unchecked")
      public static <E extends Comparable<? super E>> ImmutableSortedSet<E> of(E e1, E e2) {
        return ofInternal(Ordering.natural(), e1, e2);
      }
    
      @SuppressWarnings("unchecked")
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 08 03:01:02 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/TreeMultimapNaturalTest.java

        assertEquals(tree, copyFromTree);
        assertSame(Ordering.natural(), copyFromTree.keyComparator());
        assertSame(Ordering.natural(), copyFromTree.valueComparator());
        assertSame(Ordering.natural(), copyFromTree.get(1.0).comparator());
      }
    
      /** Test that creating one TreeMultimap from a non-TreeMultimap results in natural ordering. */
      public void testCreateFromHashMultimap() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Mar 07 18:34:03 UTC 2024
    - 22.6K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/ImmutableSortedSet.java

       * of their natural ordering.
       */
      public static <E extends Comparable<?>> Builder<E> reverseOrder() {
        return new Builder<>(Collections.reverseOrder());
      }
    
      /**
       * Returns a builder that creates immutable sorted sets whose elements are ordered by their
       * natural ordering. The sorted sets use {@link Ordering#natural()} as the comparator. This method
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 08 03:01:02 UTC 2024
    - 38.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/OrderingTest.java

            .addEqualityGroup(Ordering.natural())
            .testEquals();
        reserializeAndAssert(comparator);
        assertEquals("Ordering.natural().reverse().onResultOf(StringLength)", comparator.toString());
      }
    
      public void testLexicographical() {
        Ordering<String> ordering = Ordering.natural();
        Ordering<Iterable<String>> lexy = ordering.lexicographical();
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Mar 07 18:34:03 UTC 2024
    - 42.5K bytes
    - Viewed (0)
  10. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedMap.java

          K k1, V v1, K k2, V v2) {
        return new Builder<K, V>(Ordering.natural()).put(k1, v1).put(k2, v2).build();
      }
    
      public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of(
          K k1, V v1, K k2, V v2, K k3, V v3) {
        return new Builder<K, V>(Ordering.natural()).put(k1, v1).put(k2, v2).put(k3, v3).build();
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 27 19:19:19 UTC 2024
    - 16.4K bytes
    - Viewed (0)
Back to top