Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for sortedCopy (0.07 sec)

  1. guava-tests/benchmark/com/google/common/collect/SortedCopyBenchmark.java

    import java.util.List;
    import java.util.Random;
    import java.util.Set;
    import java.util.TreeSet;
    
    /**
     * Provides supporting data for performance notes in the documentation of {@link
     * Ordering#sortedCopy} and {@link Ordering#immutableSortedCopy}, as well as for automated code
     * suggestions.
     *
     */
    public class SortedCopyBenchmark {
      @Param({"1", "10", "1000", "1000000"})
      int size; // logarithmic triangular
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/TreeMultimapNaturalTest.java

                                .compare(
                                    left.getValue(), right.getValue(), Ordering.natural().nullsFirst())
                                .result();
                          }
                        }.sortedCopy(insertionOrder);
                      }
                    })
                .named("TreeMultimap nullsFirst")
                .withFeatures(
                    MapFeature.ALLOWS_NULL_KEYS,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/collect/SortedCopyBenchmark.java

    import java.util.List;
    import java.util.Random;
    import java.util.Set;
    import java.util.TreeSet;
    
    /**
     * Provides supporting data for performance notes in the documentation of {@link
     * Ordering#sortedCopy} and {@link Ordering#immutableSortedCopy}, as well as for automated code
     * suggestions.
     *
     */
    public class SortedCopyBenchmark {
      @Param({"1", "10", "1000", "1000000"})
      int size; // logarithmic triangular
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/OrderingTest.java

            unmodifiableList(Arrays.<@Nullable Integer>asList(5, 0, 3, null, 0, 9));
        List<@Nullable Integer> sortedInts = numberOrdering.nullsLast().sortedCopy(unsortedInts);
        assertEquals(Arrays.<@Nullable Integer>asList(0, 0, 3, 5, 9, null), sortedInts);
    
        assertEquals(emptyList(), numberOrdering.sortedCopy(Collections.<Integer>emptyList()));
      }
    
      public void testImmutableSortedCopy() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/OrderingTest.java

            unmodifiableList(Arrays.<@Nullable Integer>asList(5, 0, 3, null, 0, 9));
        List<@Nullable Integer> sortedInts = numberOrdering.nullsLast().sortedCopy(unsortedInts);
        assertEquals(Arrays.<@Nullable Integer>asList(0, 0, 3, 5, 9, null), sortedInts);
    
        assertEquals(emptyList(), numberOrdering.sortedCopy(Collections.<Integer>emptyList()));
      }
    
      public void testImmutableSortedCopy() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/ImmutableSortedMultisetTest.java

                      }
    
                      @Override
                      public List<String> order(List<String> insertionOrder) {
                        return Ordering.natural().sortedCopy(insertionOrder);
                      }
                    })
                .named("ImmutableSortedMultiset")
                .withFeatures(
                    CollectionSize.ANY,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/google/MapGenerators.java

            @Override
            public int compare(Entry<AnEnum, String> left, Entry<AnEnum, String> right) {
              return left.getKey().compareTo(right.getKey());
            }
          }.sortedCopy(insertionOrder);
        }
      }
    
      public static class ImmutableMapValuesAsSingletonSetGenerator
          implements TestMapGenerator<String, Collection<Integer>> {
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/Ordering.java

       * Note especially that {@link #sortedCopy} and {@link #immutableSortedCopy} are stable, and in
       * the returned instance these are implemented by simply copying the source list.
       *
       * <p>Example:
       *
       * <pre>{@code
       * Ordering.allEqual().nullsLast().sortedCopy(
       *     asList(t, null, e, s, null, t, null))
       * }</pre>
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/IterablesTest.java

          List<Integer> list = Lists.newLinkedList();
          for (int j = 0; j < i; j++) {
            list.add(j);
            allIntegers.add(j);
          }
          iterables.add(Ordering.<Integer>natural().sortedCopy(list));
        }
    
        verifyMergeSorted(iterables, allIntegers);
      }
    
      // Like the pyramid, but creates more unique values, along with repeated ones.
      public void testMergeSorted_skipping_pyramid() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 19:12:33 UTC 2024
    - 45K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/SetsTest.java

                      }
    
                      @Override
                      public List<String> order(List<String> insertionOrder) {
                        return Ordering.natural().sortedCopy(insertionOrder);
                      }
                    })
                .named("Sets.unmodifiableNavigableSet[TreeSet]")
                .withFeatures(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 48.6K bytes
    - Viewed (0)
Back to top