- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 192 for natural (0.06 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/graph/ElementOrderTest.java
} @Test public void nodeOrder_natural() { MutableGraph<Integer> graph = GraphBuilder.directed().nodeOrder(ElementOrder.<Integer>natural()).build(); addNodes(graph); assertThat(graph.nodeOrder()).isEqualTo(ElementOrder.sorted(Ordering.<Integer>natural())); assertThat(graph.nodes()).containsExactly(1, 3, 4).inOrder(); } @Test public void nodeOrder_sorted() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 8.1K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedSet.java
} public static <E extends Comparable<? super E>> ImmutableSortedSet<E> of(E e1) { return ofInternal(Ordering.natural(), e1); } @SuppressWarnings("unchecked") public static <E extends Comparable<? super E>> ImmutableSortedSet<E> of(E e1, E e2) { return ofInternal(Ordering.natural(), e1, e2); } @SuppressWarnings("unchecked")
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Aug 19 16:21:24 UTC 2024 - 15.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) -
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) -
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) -
android/guava-tests/test/com/google/common/collect/SortedIterablesTest.java
// Before JDK6 (including under GWT), the TreeMap keySet is a plain Set. if (Maps.newTreeMap().keySet() instanceof SortedSet) { assertTrue(SortedIterables.hasSameComparator(Ordering.natural(), Maps.newTreeMap().keySet())); } assertTrue( SortedIterables.hasSameComparator(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Feb 19 20:34:55 UTC 2024 - 1.5K bytes - Viewed (0)