- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 124 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/src/com/google/common/collect/TreeMultiset.java
// reading data stored by writeObject Comparator<? super E> comparator = (Comparator<? super E>) requireNonNull(stream.readObject()); Serialization.getFieldSetter(AbstractSortedMultiset.class, "comparator").set(this, comparator); Serialization.getFieldSetter(TreeMultiset.class, "range") .set(this, GeneralRange.all(comparator)); Serialization.getFieldSetter(TreeMultiset.class, "rootReference")
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 34.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/SortedLists.java
Comparator<? super E> comparator, @ParametricNullness E key, List<? extends E> list, int foundIndex) { return FIRST_PRESENT.resultIndex(comparator, key, list, foundIndex) - 1; } }; abstract <E extends @Nullable Object> int resultIndex( Comparator<? super E> comparator, @ParametricNullness E key,
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-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/src/com/google/common/collect/Collections2.java
Iterable<E> elements, Comparator<? super E> comparator) { return new OrderedPermutationCollection<E>(elements, comparator); } private static final class OrderedPermutationCollection<E> extends AbstractCollection<List<E>> { final ImmutableList<E> inputList; final Comparator<? super E> comparator; final int size; OrderedPermutationCollection(Iterable<E> input, Comparator<? super E> comparator) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 22.8K 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)