- Sort Score
- Num 10 results
- Language All
Results 21 - 30 of 49 for saturatedCast (0.12 seconds)
-
android/guava-tests/test/com/google/common/primitives/IntsTest.java
for (int value : VALUES) { assertThat(Ints.saturatedCast((long) value)).isEqualTo(value); } assertThat(Ints.saturatedCast(GREATEST + 1L)).isEqualTo(GREATEST); assertThat(Ints.saturatedCast(LEAST - 1L)).isEqualTo(LEAST); assertThat(Ints.saturatedCast(Long.MAX_VALUE)).isEqualTo(GREATEST); assertThat(Ints.saturatedCast(Long.MIN_VALUE)).isEqualTo(LEAST); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Mar 08 01:43:32 GMT 2026 - 29.4K bytes - Click Count (0) -
guava/src/com/google/common/collect/RegularImmutableSortedMultiset.java
return (index >= 0) ? getCount(index) : 0; } @Override public int size() { long size = cumulativeCounts[offset + length] - cumulativeCounts[offset]; return Ints.saturatedCast(size); } @Override public ImmutableSortedSet<E> elementSet() { return elementSet; } @Override public ImmutableSortedMultiset<E> headMultiset(E upperBound, BoundType boundType) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Dec 28 01:26:26 GMT 2024 - 4.5K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java
return backingMap.size(); } @Override public final Iterator<E> iterator() { return Multisets.iteratorImpl(this); } @Override public final int size() { return Ints.saturatedCast(size); } /** * @serialData the number of distinct elements, the first element, its count, the second element, * its count, and so on */ @GwtIncompatible @J2ktIncompatible
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Dec 05 23:15:58 GMT 2025 - 7.9K bytes - Click Count (0) -
guava/src/com/google/common/collect/RegularImmutableMultiset.java
} return hashFloodingDetected(hashTable) ? JdkBackedImmutableMultiset.create(asImmutableList(entryArray)) : new RegularImmutableMultiset<E>( entryArray, hashTable, Ints.saturatedCast(size), hashCode, null); } private static boolean hashFloodingDetected(@Nullable ImmutableEntry<?>[] hashTable) { for (int i = 0; i < hashTable.length; i++) { int bucketLength = 0;Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Dec 26 20:08:09 GMT 2025 - 6.8K bytes - Click Count (0) -
android/guava/src/com/google/common/math/IntMath.java
return Ints.saturatedCast((long) a + b); } /** * Returns the difference of {@code a} and {@code b} unless it would overflow or underflow in * which case {@code Integer.MAX_VALUE} or {@code Integer.MIN_VALUE} is returned, respectively. * * @since 20.0 */ public static int saturatedSubtract(int a, int b) { return Ints.saturatedCast((long) a - b); } /**Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Jan 29 22:14:05 GMT 2026 - 26.1K bytes - Click Count (0) -
guava/src/com/google/common/collect/EnumMultiset.java
} } @Override int distinctElements() { return distinctElements; } @Override public int size() { return Ints.saturatedCast(size); } @Override public int count(@Nullable Object element) { // isActuallyE checks for null, but we check explicitly to help nullness checkers. if (element == null || !isActuallyE(element)) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 9.3K bytes - Click Count (0) -
guava/src/com/google/common/collect/ImmutableRangeSet.java
total += ContiguousSet.create(range, domain).size(); if (total >= Integer.MAX_VALUE) { break; } } result = size = Ints.saturatedCast(total); } return result; } @Override public UnmodifiableIterator<C> iterator() { return new AbstractIterator<C>() {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 16:45:58 GMT 2026 - 27.4K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ImmutableRangeSet.java
total += ContiguousSet.create(range, domain).size(); if (total >= Integer.MAX_VALUE) { break; } } result = size = Ints.saturatedCast(total); } return result; } @Override public UnmodifiableIterator<C> iterator() { return new AbstractIterator<C>() {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 16:45:58 GMT 2026 - 27.5K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/EnumMultiset.java
} } @Override int distinctElements() { return distinctElements; } @Override public int size() { return Ints.saturatedCast(size); } @Override public int count(@Nullable Object element) { // isActuallyE checks for null, but we check explicitly to help nullness checkers. if (element == null || !isActuallyE(element)) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 9K bytes - Click Count (0) -
android/guava/src/com/google/common/graph/AbstractBaseGraph.java
@Override public UnmodifiableIterator<EndpointPair<N>> iterator() { return EndpointPairIterator.of(AbstractBaseGraph.this); } @Override public int size() { return Ints.saturatedCast(edgeCount()); } @Override public boolean remove(@Nullable Object o) { throw new UnsupportedOperationException(); }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Oct 07 15:57:03 GMT 2025 - 11.5K bytes - Click Count (0)