- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 71 for Comparator (0.06 sec)
-
guava/src/com/google/common/collect/ImmutableSortedMap.java
public static <K, V> ImmutableSortedMap<K, V> copyOfSorted(SortedMap<K, ? extends V> map) { Comparator<? super K> comparator = map.comparator(); if (comparator == null) { // If map has a null comparator, the keys should have a natural ordering, // even though K doesn't explicitly implement Comparable. comparator = (Comparator<? super K>) NATURAL_ORDER; } if (map instanceof ImmutableSortedMap) {
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-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/src/com/google/common/collect/Ordering.java
* there is no need to use this method. * * @param comparator the comparator that defines the order * @return comparator itself if it is already an {@code Ordering}; otherwise an ordering that * wraps that comparator */ @GwtCompatible(serializable = true) public static <T extends @Nullable Object> Ordering<T> from(Comparator<T> comparator) { return (comparator instanceof Ordering) ? (Ordering<T>) comparator
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-testlib/src/com/google/common/collect/testing/testers/SortedMapNavigationTester.java
} @CollectionSize.Require(absent = ZERO) 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) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 6.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/RegularImmutableTable.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 7.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ComparatorsTest.java
/** * Tests for {@code Comparators}. * * @author Louis Wasserman */ @GwtCompatible @ElementTypesAreNonnullByDefault public class ComparatorsTest extends TestCase { public void testLexicographical() { Comparator<String> comparator = Ordering.natural(); Comparator<Iterable<String>> lexy = Comparators.lexicographical(comparator); ImmutableList<String> empty = ImmutableList.of();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 6.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/MinMaxPriorityQueue.java
*/ private static final int UNSET_EXPECTED_SIZE = -1; private final Comparator<B> comparator; private int expectedSize = UNSET_EXPECTED_SIZE; private int maximumSize = Integer.MAX_VALUE; private Builder(Comparator<B> comparator) { this.comparator = checkNotNull(comparator); } /**
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/TreeBasedTable.java
private final Comparator<? super C> columnComparator; private static class Factory<C, V> implements Supplier<Map<C, V>>, Serializable { final Comparator<? super C> comparator; Factory(Comparator<? super C> comparator) { this.comparator = comparator; } @Override public Map<C, V> get() { return new TreeMap<>(comparator); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 11.5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableSortedMap.java
public static <K, V> ImmutableSortedMap<K, V> copyOfSorted(SortedMap<K, ? extends V> map) { Comparator<? super K> comparator = map.comparator(); if (comparator == null) { // If map has a null comparator, the keys should have a natural ordering, // even though K doesn't explicitly implement Comparable. comparator = (Comparator<? super K>) NATURAL_ORDER; } if (map instanceof ImmutableSortedMap) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 53K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Ordering.java
* there is no need to use this method. * * @param comparator the comparator that defines the order * @return comparator itself if it is already an {@code Ordering}; otherwise an ordering that * wraps that comparator */ @GwtCompatible(serializable = true) public static <T extends @Nullable Object> Ordering<T> from(Comparator<T> comparator) { return (comparator instanceof Ordering) ? (Ordering<T>) comparator
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 39.4K bytes - Viewed (0)