Search Options

Results per page
Sort
Preferred Languages
Advance

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

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

       * When multiple elements are equivalent according to {@code compareTo()}, only the first one
       * specified is included. To create a copy of a {@code SortedSet} 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 Set<String>}, then {@code ImmutableSortedSet.copyOf(s)}
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/ImmutableSortedSet.java

       * When multiple elements are equivalent according to {@code compareTo()}, only the first one
       * specified is included. To create a copy of a {@code SortedSet} 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 Set<String>}, then {@code ImmutableSortedSet.copyOf(s)}
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  3. android/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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  4. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 46.7K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/ImmutableSortedMultisetTest.java

            .thenReturn(Ordering.<Comparable<String>>natural());
        when(toCopy.entrySet()).thenReturn(entrySet);
        ImmutableSortedMultiset<String> unused = ImmutableSortedMultiset.copyOfSorted(toCopy);
        assertTrue(entrySet.toArrayCalled);
      }
    
      private static class IntegerDiv10 implements Comparable<IntegerDiv10> {
        final int value;
    
        IntegerDiv10(int value) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  6. android/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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 35.4K bytes
    - Viewed (0)
  7. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 50.4K 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 53K bytes
    - Viewed (0)
  9. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 161.6K bytes
    - Viewed (0)
  10. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 167.4K bytes
    - Viewed (0)
Back to top