Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 91 for natural (0.13 sec)

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

            .addEqualityGroup(Ordering.natural())
            .testEquals();
      }
    
      public void testIsInOrder() {
        assertFalse(isInOrder(asList(5, 3, 0, 9), Ordering.natural()));
        assertFalse(isInOrder(asList(0, 5, 3, 9), Ordering.natural()));
        assertTrue(isInOrder(asList(0, 3, 5, 9), Ordering.natural()));
        assertTrue(isInOrder(asList(0, 0, 3, 3), Ordering.natural()));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/TestIntegerSortedSetGenerator.java

     *
     * @author Chris Povirk
     * @author Jared Levy
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public abstract class TestIntegerSortedSetGenerator extends TestIntegerSetGenerator {
      @Override
      protected abstract SortedSet<Integer> create(Integer[] elements);
    
      /** Sorts the elements by their natural ordering. */
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/graph/ElementOrderTest.java

      }
    
      @Test
      public void nodeOrder_natural() {
        MutableGraph<Integer> graph =
            GraphBuilder.directed().nodeOrder(ElementOrder.<Integer>natural()).build();
    
        addNodes(graph);
    
        assertThat(graph.nodeOrder()).isEqualTo(ElementOrder.sorted(Ordering.<Integer>natural()));
        assertThat(graph.nodes()).containsExactly(1, 3, 4).inOrder();
      }
    
      @Test
      public void nodeOrder_sorted() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 10 19:45:10 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  4. android/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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Feb 19 20:34:55 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  5. 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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Feb 19 20:34:55 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  6. guava-tests/benchmark/com/google/common/collect/SortedCopyBenchmark.java

          for (int i = 0; i < reps; i++) {
            dummy += ImmutableSortedSet.copyOf(input).first();
          }
        }
        return dummy;
      }
    
      private static final Ordering<Integer> ORDERING = Ordering.natural();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  7. 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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Mar 09 00:21:17 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java

        }
      }
    
      public enum ComparatorType {
        CHEAP {
          @Override
          public Comparator<Integer> get() {
            return Ordering.natural();
          }
        },
        EXPENSIVE {
          @Override
          public Comparator<Integer> get() {
            return Ordering.natural().onResultOf(new ExpensiveComputation());
          }
        };
    
        public abstract Comparator<Integer> get();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Apr 19 19:24:36 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/graph/StandardImmutableGraphAdditionalTest.java

                .allowsSelfLoops(true)
                .nodeOrder(ElementOrder.<String>natural())
                .immutable()
                .build();
    
        assertThat(emptyGraph.isDirected()).isTrue();
        assertThat(emptyGraph.allowsSelfLoops()).isTrue();
        assertThat(emptyGraph.nodeOrder()).isEqualTo(ElementOrder.<String>natural());
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 09 20:24:43 UTC 2020
    - 4.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/graph/StandardImmutableGraphAdditionalTest.java

                .allowsSelfLoops(true)
                .nodeOrder(ElementOrder.<String>natural())
                .immutable()
                .build();
    
        assertThat(emptyGraph.isDirected()).isTrue();
        assertThat(emptyGraph.allowsSelfLoops()).isTrue();
        assertThat(emptyGraph.nodeOrder()).isEqualTo(ElementOrder.<String>natural());
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 09 20:24:43 UTC 2020
    - 4.5K bytes
    - Viewed (0)
Back to top