- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for copyOfSorted (0.04 sec)
-
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); assertSame(copy, ImmutableSortedMap.copyOfSorted(copy)); assertSame(Ordering.natural(), copy.comparator()); } public void testCopyOfSortedExplicit() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 27.6K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 29.5K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Jul 17 15:26:41 UTC 2025 - 16.9K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Jul 17 15:26:41 UTC 2025 - 16.6K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 36.8K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 18:32:41 UTC 2025 - 16.1K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 46.7K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 18:32:41 UTC 2025 - 15.5K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 21.4K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 18.7K bytes - Viewed (0)