- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 314 for comparator (0.24 sec)
-
guava-testlib/src/com/google/common/collect/testing/Helpers.java
* the given {@code comparator}. * * @see #testComparator(Comparator, List) */ public static <T extends @Nullable Object> void testComparator( Comparator<? super T> comparator, T... valuesInExpectedOrder) { testComparator(comparator, asList(valuesInExpectedOrder)); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 17.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/TreeMultisetTest.java
assertEquals("a", elementSet.last()); assertEquals(comparator, elementSet.comparator()); } public void testNullAcceptingComparator() throws Exception { Comparator<@Nullable String> comparator = Ordering.<String>natural().<String>nullsFirst(); TreeMultiset<@Nullable String> ms = TreeMultiset.create(comparator); ms.add("b"); ms.add(null); ms.add("a"); ms.add("b");
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 12.9K bytes - Viewed (0) -
guava/src/com/google/common/collect/DescendingMultiset.java
abstract SortedMultiset<E> forwardMultiset(); @LazyInit @CheckForNull private transient Comparator<? super E> comparator; @Override public Comparator<? super E> comparator() { Comparator<? super E> result = comparator; if (result == null) { return comparator = Ordering.from(forwardMultiset().comparator()).<E>reverse(); } return result; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Jun 26 21:02:13 UTC 2023 - 4.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/graph/ElementOrderTest.java
// Sorting of user-defined classes @Test public void customComparator() { Comparator<NonComparableSuperClass> comparator = new Comparator<NonComparableSuperClass>() { @Override public int compare(NonComparableSuperClass left, NonComparableSuperClass right) { return left.value.compareTo(right.value); } }; MutableGraph<NonComparableSuperClass> graph =
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-testlib/src/com/google/common/collect/testing/google/SetGenerators.java
@Override protected List<String> create(String[] elements) { Comparator<String> comparator = createExplicitComparator(elements); ImmutableSet<String> set = ImmutableSortedSet.copyOf(comparator, asList(elements)); return set.asList(); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 15.6K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/SortedMapNavigationTester.java
public void testOrderedByComparator() { Comparator<? super K> comparator = navigableMap.comparator(); if (comparator == null) { comparator = new Comparator<K>() { @SuppressWarnings("unchecked") @Override public int compare(K o1, K o2) { return ((Comparable) o1).compareTo(o2); } }; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 6.1K bytes - Viewed (0) -
guava/src/com/google/common/collect/GeneralRange.java
Comparator<? super T> comparator, @ParametricNullness T endpoint, BoundType boundType) { return new GeneralRange<>(comparator, true, endpoint, boundType, false, null, OPEN); } /** * Returns everything below the endpoint relative to the specified comparator, with the specified * endpoint behavior. */ static <T extends @Nullable Object> GeneralRange<T> upTo(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 22 21:19:52 UTC 2024 - 10.8K bytes - Viewed (0) -
android/guava/src/com/google/common/graph/ElementOrder.java
* <li>SORTED: ordering according to a supplied comparator is guaranteed. * </ul> */ public enum Type { UNORDERED, STABLE, INSERTION, SORTED } private ElementOrder(Type type, @CheckForNull Comparator<T> comparator) { this.type = checkNotNull(type); this.comparator = comparator; checkState((type == Type.SORTED) == (comparator != null)); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 17:21:56 UTC 2024 - 6.7K bytes - Viewed (0) -
guava/src/com/google/common/graph/ElementOrder.java
* <li>SORTED: ordering according to a supplied comparator is guaranteed. * </ul> */ public enum Type { UNORDERED, STABLE, INSERTION, SORTED } private ElementOrder(Type type, @CheckForNull Comparator<T> comparator) { this.type = checkNotNull(type); this.comparator = comparator; checkState((type == Type.SORTED) == (comparator != null)); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 17:21:56 UTC 2024 - 6.7K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ComparatorOrdering.java
this.comparator = checkNotNull(comparator); } @Override public int compare(@ParametricNullness T a, @ParametricNullness T b) { return comparator.compare(a, b); } @Override public boolean equals(@CheckForNull Object object) { if (object == this) { return true; } if (object instanceof ComparatorOrdering) { ComparatorOrdering<?> that = (ComparatorOrdering<?>) object;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sun Jun 20 14:22:42 UTC 2021 - 1.9K bytes - Viewed (0)