- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for naturalOrder (0.07 sec)
-
guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java
ImmutableSortedMap<String, Integer> map = ImmutableSortedMap.<String, Integer>naturalOrder().build(); assertEquals(Collections.<String, Integer>emptyMap(), map); } public void testSingletonBuilder() { ImmutableSortedMap<String, Integer> map = ImmutableSortedMap.<String, Integer>naturalOrder().put("one", 1).build(); assertMapEquals(map, "one", 1); } public void testBuilder() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 27.6K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/SortedMapGenerators.java
@Override public SortedMap<String, String> create(Entry<String, String>[] entries) { ImmutableSortedMap.Builder<String, String> builder = ImmutableSortedMap.naturalOrder(); for (Entry<String, String> entry : entries) { checkNotNull(entry); builder.put(entry.getKey(), entry.getValue()); } return builder.build(); } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Aug 10 19:54:19 UTC 2025 - 4.8K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java
@SuppressWarnings({"unchecked", "rawtypes"}) Comparator<? super E> naturalOrder = (Comparator<? super E>) Comparator.<Comparable>naturalOrder(); comparator = naturalOrder; } assertTrue(Ordering.from(comparator).isOrdered(resultsForStrategy)); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Apr 14 16:07:06 UTC 2025 - 12.5K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java
@SuppressWarnings({"unchecked", "rawtypes"}) Comparator<? super E> naturalOrder = (Comparator<? super E>) Comparator.<Comparable>naturalOrder(); comparator = naturalOrder; } assertTrue(Ordering.from(comparator).isOrdered(resultsForStrategy)); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 12.1K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/SortedMapGenerators.java
@Override public SortedMap<String, String> create(Entry<String, String>[] entries) { ImmutableSortedMap.Builder<String, String> builder = ImmutableSortedMap.naturalOrder(); for (Entry<String, String> entry : entries) { checkNotNull(entry); builder.put(entry.getKey(), entry.getValue()); } return builder.build(); } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Aug 10 19:54:19 UTC 2025 - 4.8K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableSortedSet.java
/** * Not supported. Use {@link #naturalOrder}, which offers better type-safety, instead. This method * exists only to hide {@link ImmutableSet#builder} from consumers of {@code ImmutableSortedSet}. * * @throws UnsupportedOperationException always * @deprecated Use {@link ImmutableSortedSet#naturalOrder}, which offers better type-safety. */ @DoNotCall("Use naturalOrder") @Deprecated
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/src/com/google/common/collect/ImmutableSortedMultiset.java
// Hack around E not being a subtype of Comparable. // Unsafe, see ImmutableSortedMultisetFauxverideShim. @SuppressWarnings("unchecked") Ordering<E> naturalOrder = (Ordering<E>) Ordering.<Comparable<?>>natural(); return copyOf(naturalOrder, elements); } /** * Returns an immutable sorted multiset containing the given elements sorted by their natural * ordering. *
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-tests/test/com/google/common/collect/ComparatorsTest.java
import static com.google.common.truth.Truth.assertThat; import static java.util.Arrays.asList; import static java.util.Collections.singleton; import static java.util.Comparator.comparing; import static java.util.Comparator.naturalOrder; import static java.util.Comparator.reverseOrder; import com.google.common.annotations.GwtCompatible; import com.google.common.testing.EqualsTester; import java.util.Collections; import java.util.Comparator;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Apr 12 15:07:59 UTC 2025 - 6.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ComparisonChainTest.java
import static com.google.common.truth.Truth.assertWithMessage; import static java.lang.Integer.signum; import static java.util.Comparator.comparing; import static java.util.Comparator.naturalOrder; import static java.util.Comparator.nullsLast; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Booleans;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Feb 12 03:05:13 UTC 2025 - 7.6K bytes - Viewed (0) -
guava/src/com/google/common/collect/ComparisonChain.java
* import static java.util.Comparator.nullsLast; * import static java.util.Comparator.naturalOrder; * * ... * private static final Comparator<Foo> COMPARATOR = * comparing((Foo foo) -> foo.aString) * .thenComparing(foo -> foo.anInt) * .thenComparing(foo -> foo.anEnum, nullsLast(naturalOrder())); * * @Override * public int compareTo(Foo that) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 11.1K bytes - Viewed (0)