Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for copyOfSorted (0.05 sec)

  1. guava/src/com/google/common/collect/ImmutableSortedMultiset.java

      }
    
      /**
       * Returns an immutable sorted multiset containing the given elements sorted by their natural
       * ordering. To create a copy of a {@code SortedMultiset} that preserves the comparator, call
       * {@link #copyOfSorted} instead. This method iterates over {@code elements} at most once.
       *
       * <p>Note that if {@code s} is a {@code Multiset<String>}, then {@code
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 22 21:07:18 UTC 2025
    - 29.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java

        SortedSet<String> set = ImmutableSortedSet.copyOfSorted(input);
        assertThat(set).containsExactly("a", "in", "jumped", "over", "quick", "the").inOrder();
      }
    
      public void testCopyOfSorted_natural_comparator() {
        SortedSet<String> input = Sets.newTreeSet(asList("in", "the", "quick", "jumped", "over", "a"));
        SortedSet<String> set = ImmutableSortedSet.copyOfSorted(input);
        assertSame(Ordering.natural(), set.comparator());
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 45.8K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/CollectCollectors.java

        checkNotNull(valueFunction);
        checkNotNull(mergeFunction);
        return collectingAndThen(
            toMap(keyFunction, valueFunction, mergeFunction, () -> new TreeMap<K, V>(comparator)),
            ImmutableSortedMap::copyOfSorted);
      }
    
      static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableBiMap<K, V>> toImmutableBiMap(
          Function<? super T, ? extends K> keyFunction,
          Function<? super T, ? extends V> valueFunction) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 22 18:35:44 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedMap.java

        checkNotNull(mergeFunction);
        return Collectors.collectingAndThen(
            Collectors.toMap(
                keyFunction, valueFunction, mergeFunction, () -> new TreeMap<K, V>(comparator)),
            ImmutableSortedMap::copyOfSorted);
      }
    
      // unsafe, comparator() returns a comparator on the specified type
      @SuppressWarnings("unchecked")
      public static <K, V> ImmutableSortedMap<K, V> of() {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 22 21:07:18 UTC 2025
    - 16.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java

        SortedSet<String> set = ImmutableSortedSet.copyOfSorted(input);
        assertThat(set).containsExactly("a", "in", "jumped", "over", "quick", "the").inOrder();
      }
    
      public void testCopyOfSorted_natural_comparator() {
        SortedSet<String> input = Sets.newTreeSet(asList("in", "the", "quick", "jumped", "over", "a"));
        SortedSet<String> set = ImmutableSortedSet.copyOfSorted(input);
        assertSame(Ordering.natural(), set.comparator());
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 46.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ImmutableCollection.java

     * usually include:
     *
     * <ul>
     *   <li>Static methods named {@code of}, accepting an explicit list of elements or entries.
     *   <li>Static methods named {@code copyOf} (or {@code copyOfSorted}), accepting an existing
     *       collection whose contents should be copied.
     *   <li>A static nested {@code Builder} class which can be used to populate a new immutable
     *       instance.
     * </ul>
     *
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 21.4K bytes
    - Viewed (0)
  7. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedSet.java

        return copyOfInternal(comparator, elements);
      }
    
      // We use NATURAL_ORDER only if the input was already using natural ordering.
      @SuppressWarnings("unchecked")
      public static <E> ImmutableSortedSet<E> copyOfSorted(SortedSet<E> sortedSet) {
        Comparator<? super E> comparator = sortedSet.comparator();
        if (comparator == null) {
          comparator = (Comparator<? super E>) NATURAL_ORDER;
        }
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed Aug 06 18:32:41 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

       * undocumented and subject to change.
       *
       * @throws NullPointerException if any key or value in {@code map} is null
       */
      @SuppressWarnings("unchecked")
      public static <K, V> ImmutableSortedMap<K, V> copyOfSorted(SortedMap<K, ? extends V> map) {
        Comparator<? super K> comparator = map.comparator();
        if (comparator == null) {
          // If map has a null comparator, the keys should have a natural ordering,
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 22 21:07:18 UTC 2025
    - 52.9K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/Maps.java

       * and using the same ordering as the specified map.
       *
       * <p><b>Note:</b> if mutability is not required, use {@link
       * ImmutableSortedMap#copyOfSorted(SortedMap)} instead.
       *
       * <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
       * use the {@code TreeMap} constructor directly, taking advantage of <a
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Nov 17 22:50:48 UTC 2025
    - 163.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Maps.java

       * and using the same ordering as the specified map.
       *
       * <p><b>Note:</b> if mutability is not required, use {@link
       * ImmutableSortedMap#copyOfSorted(SortedMap)} instead.
       *
       * <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
       * use the {@code TreeMap} constructor directly, taking advantage of <a
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 23 17:50:58 UTC 2025
    - 157.6K bytes
    - Viewed (0)
Back to top