Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 18 of 18 for copyOfSorted (0.14 seconds)

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

        original.put("one", 1);
        original.put("two", 2);
        original.put("three", 3);
    
        ImmutableSortedMap<String, Integer> copy = ImmutableSortedMap.copyOfSorted(original);
        assertMapEquals(copy, "one", 1, "three", 3, "two", 2);
        assertThat(ImmutableSortedMap.copyOfSorted(copy)).isSameInstanceAs(copy);
        assertThat(copy.comparator()).isEqualTo(Ordering.natural());
      }
    
      public void testCopyOfSortedExplicit() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 29.8K bytes
    - Click Count (0)
  2. 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,
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 08 18:10:02 GMT 2026
    - 52.1K bytes
    - Click Count (0)
  3. 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);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 46.3K bytes
    - Click Count (0)
  4. 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,
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 08 18:10:02 GMT 2026
    - 54.7K bytes
    - Click Count (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);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 47.2K bytes
    - Click Count (0)
  6. 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) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 22.8K bytes
    - Click Count (0)
  7. 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
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 157.6K bytes
    - Click Count (0)
  8. 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
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 163.4K bytes
    - Click Count (0)
Back to Top