- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 82 for comparable (0.03 sec)
-
android/guava/src/com/google/common/collect/NaturalOrdering.java
public int compare(Comparable<?> left, Comparable<?> right) { checkNotNull(left); // for GWT checkNotNull(right); return ((Comparable<Object>) left).compareTo(right); } @Override @SuppressWarnings("unchecked") // TODO(kevinb): the right way to explain this?? public <S extends Comparable<?>> Ordering<@Nullable S> nullsFirst() { Ordering<@Nullable Comparable<?>> result = nullsFirst;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jun 04 13:03:16 UTC 2025 - 3K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/primitives/UnsignedLongsBenchmark.java
} return tmp; } @Benchmark long parseUnsignedLong(int reps) { long tmp = 0; // Given that we make three calls per pass, we scale reps down in order // to do a comparable amount of work to other measurements. int scaledReps = reps / 3 + 1; for (int i = 0; i < scaledReps; i++) { int j = i & ARRAY_MASK; tmp += UnsignedLongs.parseUnsignedLong(decimalStrings[j]);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 28 01:26:26 UTC 2024 - 4.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/MultimapBuilderTest.java
} // J2kt cannot translate the Comparable rawtype in a usable way (it becomes Comparable<Object> // but types are typically only Comparable to themselves). @SuppressWarnings({"rawtypes", "unchecked"}) private static MultimapBuilderWithKeys<Comparable<?>> rawtypeToWildcard( MultimapBuilderWithKeys<Comparable> treeKeys) { return (MultimapBuilderWithKeys) treeKeys; }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 5.2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/RegularContiguousSet.java
protected @Nullable C computeNext(C previous) { return equalsOrThrow(previous, first) ? null : domain.previous(previous); } }; } private static boolean equalsOrThrow(Comparable<?> left, @Nullable Comparable<?> right) { return right != null && Range.compareOrThrow(left, right) == 0; } @Override boolean isPartialView() { return false; } @Override
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 8.3K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/primitives/UnsignedLongsBenchmark.java
} return tmp; } @Benchmark long parseUnsignedLong(int reps) { long tmp = 0; // Given that we make three calls per pass, we scale reps down in order // to do a comparable amount of work to other measurements. int scaledReps = reps / 3 + 1; for (int i = 0; i < scaledReps; i++) { int j = i & ARRAY_MASK; tmp += UnsignedLongs.parseUnsignedLong(decimalStrings[j]);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 28 01:26:26 UTC 2024 - 4.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/EmptyContiguousSet.java
import org.jspecify.annotations.Nullable; /** * An empty contiguous set. * * @author Gregory Kick */ @GwtCompatible @SuppressWarnings("rawtypes") // allow ungenerified Comparable types final class EmptyContiguousSet<C extends Comparable> extends ContiguousSet<C> { EmptyContiguousSet(DiscreteDomain<C> domain) { super(domain); } @Override public C first() { throw new NoSuchElementException(); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 4.1K bytes - Viewed (0) -
guava/src/com/google/common/collect/RangeMap.java
Range<K> span(); /** * Maps a range to a specified value (optional operation). * * <p>Specifically, after a call to {@code put(range, value)}, if {@link * Range#contains(Comparable) range.contains(k)}, then {@link #get(Comparable) get(k)} will return * {@code value}. * * <p>If {@code range} {@linkplain Range#isEmpty() is empty}, then this is a no-op. */ void put(Range<K> range, V value); /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 7.6K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/MultisetIteratorBenchmark.java
public class MultisetIteratorBenchmark { @Param({"0", "1", "16", "256", "4096", "65536"}) int size; LinkedHashMultiset<Object> linkedHashMultiset; HashMultiset<Object> hashMultiset; // TreeMultiset requires a Comparable element. TreeMultiset<Integer> treeMultiset; @BeforeExperiment void setUp() { hashMultiset = HashMultiset.create(size); linkedHashMultiset = LinkedHashMultiset.create(size);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 2.7K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java
import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; import org.jspecify.annotations.Nullable; /** * A wrapper around {@code TreeMap} that aggressively checks to see if keys are mutually comparable. * This implementation passes the navigable map test suites. * * @author Louis Wasserman */ @GwtIncompatible public final class SafeTreeMap<K, V> implements Serializable, NavigableMap<K, V> {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Feb 13 17:34:21 UTC 2025 - 7.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/LegacyComparable.java
import com.google.common.annotations.J2ktIncompatible; import java.io.Serializable; import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.Nullable; /** * A class that implements {@code Comparable} without generics, such as those found in libraries * that support Java 1.4 and before. Our library needs to do the bare minimum to accommodate such
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Feb 13 17:34:21 UTC 2025 - 2.5K bytes - Viewed (0)