- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 86 for Comparators (0.05 seconds)
-
android/guava/src/com/google/common/collect/Ordering.java
* * @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 */ public static <T extends @Nullable Object> Ordering<T> from(Comparator<T> comparator) { return (comparator instanceof Ordering) ? (Ordering<T>) comparator : new ComparatorOrdering<T>(comparator);Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Sep 23 17:50:58 GMT 2025 - 39.5K bytes - Click Count (0) -
guava/src/com/google/common/collect/ImmutableTable.java
* * @since 11.0 */ @DoNotMock public static final class Builder<R, C, V> { private final List<Cell<R, C, V>> cells = new ArrayList<>(); private @Nullable Comparator<? super R> rowComparator; private @Nullable Comparator<? super C> columnComparator; /** * Creates a new builder. The returned builder is equivalent to the builder generated by {@link * ImmutableTable#builder}. */
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 21:07:18 GMT 2025 - 17.3K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ImmutableTable.java
* * @since 11.0 */ @DoNotMock public static final class Builder<R, C, V> { private final List<Cell<R, C, V>> cells = new ArrayList<>(); private @Nullable Comparator<? super R> rowComparator; private @Nullable Comparator<? super C> columnComparator; /** * Creates a new builder. The returned builder is equivalent to the builder generated by {@link * ImmutableTable#builder}. */
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 21:07:18 GMT 2025 - 17.4K bytes - Click Count (0) -
android/guava/src/com/google/common/primitives/Booleans.java
return toString; } } /** * Returns a {@code Comparator<Boolean>} that sorts {@code true} before {@code false}. * * <p>This is particularly useful in Java 8+ in combination with {@code Comparator.comparing}, * e.g. {@code Comparator.comparing(Foo::hasBar, trueFirst())}. * * @since 21.0 */ public static Comparator<Boolean> trueFirst() { return BooleanComparator.TRUE_FIRST; } /**Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Sep 25 15:01:23 GMT 2025 - 20.6K bytes - Click Count (0) -
guava/src/com/google/common/primitives/Booleans.java
return toString; } } /** * Returns a {@code Comparator<Boolean>} that sorts {@code true} before {@code false}. * * <p>This is particularly useful in Java 8+ in combination with {@code Comparator.comparing}, * e.g. {@code Comparator.comparing(Foo::hasBar, trueFirst())}. * * @since 21.0 */ public static Comparator<Boolean> trueFirst() { return BooleanComparator.TRUE_FIRST; } /**Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Sep 25 15:01:23 GMT 2025 - 20.6K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java
// The VarHandle, Unsafe, or Java implementation. Comparator<byte[]> comparator = UnsignedBytes.lexicographicalComparator(); Helpers.testComparator(comparator, ordered); assertThat(SerializableTester.reserialize(comparator)).isSameInstanceAs(comparator); // The Java implementation. Comparator<byte[]> javaImpl = UnsignedBytes.lexicographicalComparatorJavaImpl();Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 11 20:45:32 GMT 2025 - 13.5K bytes - Click Count (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedMap.java
* should be identical to the one the user passed in. We touch only the * "secret" comparator used by the delegate implementation. */ private static <K, V> SortedMap<K, V> newModifiableDelegate(Comparator<? super K> comparator) { return newTreeMap(nullAccepting(comparator)); } private static <E> Comparator<@Nullable E> nullAccepting(Comparator<E> comparator) {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 21:07:18 GMT 2025 - 16.1K bytes - Click Count (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) {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 21:07:18 GMT 2025 - 52.9K bytes - Click Count (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(); } }Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 08 18:35:13 GMT 2025 - 15.9K bytes - Click Count (0) -
guava/src/com/google/common/collect/ImmutableSortedMultiset.java
* Comparator}. * * @throws NullPointerException if {@code comparator} or any of {@code elements} is null */ public static <E> ImmutableSortedMultiset<E> copyOf( Comparator<? super E> comparator, Iterator<? extends E> elements) { checkNotNull(comparator); return new Builder<E>(comparator).addAll(elements).build(); } /**Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 21:07:18 GMT 2025 - 29.5K bytes - Click Count (0)