- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 135 for orderedBy (0.07 sec)
-
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(); } @Override public List<String> order(List<String> insertionOrder) { sort(insertionOrder, Collections.reverseOrder()); return insertionOrder;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 15.6K bytes - Viewed (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(); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 19 19:24:36 UTC 2023 - 4.3K bytes - Viewed (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)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 46.7K bytes - Viewed (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); assertSame(SOME_COMPARATOR, queue.comparator()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 35.9K bytes - Viewed (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(); } @Override public List<String> order(List<String> insertionOrder) { sort(insertionOrder, Collections.reverseOrder()); return insertionOrder;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 15.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java
* instead. * * @throws NullPointerException if {@code comparator} is null */ public static <E> Builder<E> orderedBy(Comparator<E> comparator) { return new Builder<>(comparator); } /** * Returns a builder that creates immutable sorted multisets whose elements are ordered by the * reverse of their natural ordering. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 21:21:17 UTC 2024 - 35.4K bytes - Viewed (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); assertSame(SOME_COMPARATOR, queue.comparator()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 35.9K bytes - Viewed (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() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 22.7K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java
* creation time, the queue is unbounded. * * <p>Usage example: * * <pre>{@code * MinMaxPriorityQueue<User> users = MinMaxPriorityQueue.orderedBy(userComparator) * .maximumSize(1000) * .create(); * }</pre> * * <p>As a {@link Queue} it functions exactly as a {@link PriorityQueue}: its head element -- the
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 34.1K bytes - Viewed (0) -
guava/src/com/google/common/collect/MinMaxPriorityQueue.java
* creation time, the queue is unbounded. * * <p>Usage example: * * <pre>{@code * MinMaxPriorityQueue<User> users = MinMaxPriorityQueue.orderedBy(userComparator) * .maximumSize(1000) * .create(); * }</pre> * * <p>As a {@link Queue} it functions exactly as a {@link PriorityQueue}: its head element -- the
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 34.1K bytes - Viewed (0)