- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 314 for comparator (0.12 sec)
-
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; } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 20.4K bytes - Viewed (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; } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 20.4K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java
/** * Creates a {@code MonitorBasedPriorityBlockingQueue} with the specified initial capacity that * orders its elements according to the specified comparator. * * @param initialCapacity the initial capacity for this priority queue * @param comparator the comparator that will be used to order this priority queue. If {@code * null}, the {@linkplain Comparable natural ordering} of the elements will be used.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Jun 07 21:36:32 UTC 2024 - 19K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ComparisonChainTest.java
import static java.lang.Integer.signum; import static java.util.Comparator.comparing; import static java.util.Comparator.naturalOrder; import static java.util.Comparator.nullsLast; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Booleans; import java.util.Comparator; import junit.framework.AssertionFailedError;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Feb 27 13:27:08 UTC 2024 - 7.5K bytes - Viewed (0) -
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/src/com/google/common/collect/TopKSelector.java
* bufferSize ≥ k, then we can ignore any elements greater than this value. */ @CheckForNull private T threshold; @SuppressWarnings("unchecked") // TODO(cpovirk): Consider storing Object[] instead of T[]. private TopKSelector(Comparator<? super T> comparator, int k) { this.comparator = checkNotNull(comparator, "comparator"); this.k = k; checkArgument(k >= 0, "k (%s) must be >= 0", k);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 11.1K bytes - Viewed (0) -
guava/src/com/google/common/collect/RegularImmutableSortedSet.java
Comparator<Object> unsafeComparator() { return (Comparator<Object>) comparator; } RegularImmutableSortedSet<E> getSubSet(int newFromIndex, int newToIndex) { if (newFromIndex == 0 && newToIndex == size()) { return this; } else if (newFromIndex < newToIndex) { return new RegularImmutableSortedSet<>( elements.subList(newFromIndex, newToIndex), comparator); } else {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 9.2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/SortedSetMultimap.java
*/ @Override Map<K, Collection<V>> asMap(); /** * Returns the comparator that orders the multimap values, with {@code null} indicating that * natural ordering is used. */ @CheckForNull Comparator<? super V> valueComparator();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Jan 24 17:47:51 UTC 2022 - 5.3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 21.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java
// The Unsafe implementation if it's available. Otherwise, the 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();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 13.4K bytes - Viewed (0)