- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 215 for orderedBy (0.05 seconds)
-
guava/src/com/google/common/collect/ImmutableSortedMap.java
* * @throws NullPointerException if {@code comparator} is null */ public static <K, V> Builder<K, V> orderedBy(Comparator<K> comparator) { return new Builder<>(comparator); } /** * Returns a builder that creates immutable sorted maps whose keys are ordered by the reverse of * their natural ordering. */ public static <K extends Comparable<?>, V> Builder<K, V> reverseOrder() {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) -
android/guava-testlib/src/com/google/common/collect/testing/google/SetGenerators.java
private static final Comparator<String> STRING_REVERSED = Collections.reverseOrder(); @Override protected SortedSet<String> create(String[] elements) { return ImmutableSortedSet.orderedBy(STRING_REVERSED).add(elements).build(); } /* * While the current implementation returns `this`, that's not something we mean to guarantee.Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Sep 08 18:35:13 GMT 2025 - 15.9K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ImmutableSortedMap.java
* * @throws NullPointerException if {@code comparator} is null */ public static <K, V> Builder<K, V> orderedBy(Comparator<K> comparator) { return new Builder<>(comparator); } /** * Returns a builder that creates immutable sorted maps whose keys are ordered by the reverse of * their natural ordering. */ public static <K extends Comparable<?>, V> Builder<K, V> reverseOrder() {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) -
android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java
*/ static final class InvertedMinMaxPriorityQueue<T> extends ForwardingQueue<T> { MinMaxPriorityQueue<T> mmHeap; public InvertedMinMaxPriorityQueue(Comparator<T> comparator) { mmHeap = MinMaxPriorityQueue.orderedBy(comparator).create(); } @Override protected Queue<T> delegate() { return mmHeap; } @Override public @Nullable T poll() { return mmHeap.pollLast(); } }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 4.4K bytes - Click Count (0) -
guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java
*/ static final class InvertedMinMaxPriorityQueue<T> extends ForwardingQueue<T> { MinMaxPriorityQueue<T> mmHeap; public InvertedMinMaxPriorityQueue(Comparator<T> comparator) { mmHeap = MinMaxPriorityQueue.orderedBy(comparator).create(); } @Override protected Queue<T> delegate() { return mmHeap; } @Override public @Nullable T poll() { return mmHeap.pollLast(); } }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 4.4K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java
SortedSet<String> set = ImmutableSortedSet.orderedBy(STRING_LENGTH) .add("in", "the", "quick", "jumped", "over", "a") .build(); assertThat(set).containsExactly("a", "in", "the", "over", "quick", "jumped").inOrder(); } public void testExplicit_ordering_dupes() { SortedSet<String> set = ImmutableSortedSet.orderedBy(STRING_LENGTH)
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) -
guava-testlib/src/com/google/common/collect/testing/google/SetGenerators.java
private static final Comparator<String> STRING_REVERSED = Collections.reverseOrder(); @Override protected SortedSet<String> create(String[] elements) { return ImmutableSortedSet.orderedBy(STRING_REVERSED).add(elements).build(); } /* * While the current implementation returns `this`, that's not something we mean to guarantee.Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Sep 08 18:35:13 GMT 2025 - 15.9K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java
assertEquals(11, queue.capacity()); checkUnbounded(queue); checkNatural(queue); } public void testCreation_comparator() { MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.orderedBy(SOME_COMPARATOR).create(); assertEquals(11, queue.capacity()); checkUnbounded(queue); assertThat(queue.comparator()).isEqualTo(SOME_COMPARATOR); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 13:11:08 GMT 2026 - 36.2K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/ImmutableSortedMultisetTest.java
Comparator<String[]> comparator = Ordering.natural().lexicographical().onResultOf(Arrays::asList); String[] array = new String[] {"a"}; Multiset<String[]> multiset = ImmutableSortedMultiset.orderedBy(comparator).add(array).build(); Multiset<String[]> expected = HashMultiset.create(); expected.add(array); assertEquals(expected, multiset); } public void testCreation_arrayContainingOnlyNull() {
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) -
android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java
assertEquals(11, queue.capacity()); checkUnbounded(queue); checkNatural(queue); } public void testCreation_comparator() { MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.orderedBy(SOME_COMPARATOR).create(); assertEquals(11, queue.capacity()); checkUnbounded(queue); assertThat(queue.comparator()).isEqualTo(SOME_COMPARATOR); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 13:11:08 GMT 2026 - 36.2K bytes - Click Count (0)