- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for saturatedCast (0.86 sec)
-
guava-tests/test/com/google/common/primitives/SignedBytesTest.java
for (byte value : VALUES) { assertThat(SignedBytes.saturatedCast((long) value)).isEqualTo(value); } assertThat(SignedBytes.saturatedCast(GREATEST + 1L)).isEqualTo(GREATEST); assertThat(SignedBytes.saturatedCast(LEAST - 1L)).isEqualTo(LEAST); assertThat(SignedBytes.saturatedCast(Long.MAX_VALUE)).isEqualTo(GREATEST); assertThat(SignedBytes.saturatedCast(Long.MIN_VALUE)).isEqualTo(LEAST); }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 20:45:32 UTC 2025 - 7K bytes - Viewed (0) -
guava/src/com/google/common/collect/JdkBackedImmutableMultiset.java
@Override Entry<E> getEntry(int index) { return entries.get(index); } @Override boolean isPartialView() { return false; } @Override public int size() { return Ints.saturatedCast(size); } // redeclare to help optimizers with b/310253115 @SuppressWarnings("RedundantOverride") @Override @J2ktIncompatible @GwtIncompatible Object writeReplace() {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 23 17:50:58 UTC 2025 - 3.2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/RegularImmutableMultiset.java
this.contents = contents; long size = 0; for (int i = 0; i < contents.size(); i++) { size += contents.getValue(i); } this.size = Ints.saturatedCast(size); } @Override boolean isPartialView() { return false; } @Override public int count(@Nullable Object element) { return contents.get(element); } @OverrideRegistered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 4K bytes - Viewed (0) -
android/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) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Sat Dec 28 01:26:26 UTC 2024 - 4.3K bytes - Viewed (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
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Fri Dec 05 23:15:58 UTC 2025 - 7.9K bytes - Viewed (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)) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 9.3K bytes - Viewed (0)