- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 120 for natural (0.04 sec)
-
guava/src/com/google/common/collect/ImmutableSortedMap.java
private static final Comparator<?> NATURAL_ORDER = Ordering.natural(); private static final ImmutableSortedMap<Comparable<?>, Object> NATURAL_EMPTY_MAP = new ImmutableSortedMap<>( ImmutableSortedSet.emptySet(Ordering.natural()), ImmutableList.<Object>of()); static <K, V> ImmutableSortedMap<K, V> emptyMap(Comparator<? super K> comparator) { if (Ordering.natural().equals(comparator)) { return of(); } else {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 50.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ComparatorsTest.java
.addEqualityGroup(Ordering.natural()) .testEquals(); } public void testIsInOrder() { assertFalse(isInOrder(asList(5, 3, 0, 9), Ordering.natural())); assertFalse(isInOrder(asList(0, 5, 3, 9), Ordering.natural())); assertTrue(isInOrder(asList(0, 3, 5, 9), Ordering.natural())); assertTrue(isInOrder(asList(0, 0, 3, 3), Ordering.natural()));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 6.4K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/TestIntegerSortedSetGenerator.java
* * @author Chris Povirk * @author Jared Levy */ @GwtCompatible @ElementTypesAreNonnullByDefault public abstract class TestIntegerSortedSetGenerator extends TestIntegerSetGenerator { @Override protected abstract SortedSet<Integer> create(Integer[] elements); /** Sorts the elements by their natural ordering. */ @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 1.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/TreeMultimapNaturalTest.java
assertEquals(tree, copyFromTree); assertSame(Ordering.natural(), copyFromTree.keyComparator()); assertSame(Ordering.natural(), copyFromTree.valueComparator()); assertSame(Ordering.natural(), copyFromTree.get(1.0).comparator()); } /** Test that creating one TreeMultimap from a non-TreeMultimap results in natural ordering. */ public void testCreateFromHashMultimap() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 22.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ImmutableTableTest.java
ImmutableTable.Builder<Character, Integer, String> builder = ImmutableTable.builder(); Table<Character, Integer, String> copy = builder .orderRowsBy(Ordering.natural()) .orderColumnsBy(Ordering.natural()) .putAll(table) .build(); assertThat(copy.rowKeySet()).containsExactly('a', 'b').inOrder(); assertThat(copy.columnKeySet()).containsExactly(1, 2).inOrder();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 18.5K bytes - Viewed (0) -
guava/src/com/google/common/collect/Ordering.java
* directly * <li>Pass a <i>pre-existing</i> {@link Comparator} instance to {@link #from(Comparator)} * <li>Use the natural ordering, {@link Ordering#natural} * </ul> * * <h4>Chaining</h4> * * <p>Then you can use the <i>chaining</i> methods to get an altered version of that {@code * Ordering}, including: * * <ul> * <li>{@link #reverse}
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 39.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/OrderingTest.java
.addEqualityGroup(Ordering.natural()) .testEquals(); reserializeAndAssert(comparator); assertEquals("Ordering.natural().reverse().onResultOf(StringLength)", comparator.toString()); } public void testLexicographical() { Ordering<String> ordering = Ordering.natural(); Ordering<Iterable<String>> lexy = ordering.lexicographical();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 42.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/OrderingTest.java
.addEqualityGroup(Ordering.natural()) .testEquals(); reserializeAndAssert(comparator); assertEquals("Ordering.natural().reverse().onResultOf(StringLength)", comparator.toString()); } public void testLexicographical() { Ordering<String> ordering = Ordering.natural(); Ordering<Iterable<String>> lexy = ordering.lexicographical();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 42.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/SortedLists.java
checkNotNull(e); return binarySearch(list, e, Ordering.natural(), presentBehavior, absentBehavior); } /** * Binary searches the list for the specified key, using the specified key function. * * <p>Equivalent to {@link #binarySearch(List, Function, Object, Comparator, KeyPresentBehavior, * KeyAbsentBehavior)} using {@link Ordering#natural}. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 11K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableSortedSet.java
* of their natural ordering. */ public static <E extends Comparable<?>> Builder<E> reverseOrder() { return new Builder<>(Collections.reverseOrder()); } /** * Returns a builder that creates immutable sorted sets whose elements are ordered by their * natural ordering. The sorted sets use {@link Ordering#natural()} as the comparator. This method
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 39.1K bytes - Viewed (0)