- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 37 for saturatedCast (0.18 sec)
-
android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java
assertThat(UnsignedInts.toLong(UnsignedInts.saturatedCast(value))).isEqualTo(value); } assertThat(UnsignedInts.saturatedCast(1L << 32)).isEqualTo(GREATEST); assertThat(UnsignedInts.saturatedCast(-1L)).isEqualTo(LEAST); assertThat(UnsignedInts.saturatedCast(Long.MAX_VALUE)).isEqualTo(GREATEST); assertThat(UnsignedInts.saturatedCast(Long.MIN_VALUE)).isEqualTo(LEAST); } public void testToLong() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 12.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java
for (byte value : VALUES) { assertThat(UnsignedBytes.saturatedCast(UnsignedBytes.toInt(value))).isEqualTo(value); } assertThat(UnsignedBytes.saturatedCast(256L)).isEqualTo(GREATEST); assertThat(UnsignedBytes.saturatedCast(-1L)).isEqualTo(LEAST); assertThat(UnsignedBytes.saturatedCast(Long.MAX_VALUE)).isEqualTo(GREATEST); assertThat(UnsignedBytes.saturatedCast(Long.MIN_VALUE)).isEqualTo(LEAST); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 13.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/IntMathTest.java
b, "s*", saturatedCast(valueOf(a).multiply(valueOf(b))), IntMath.saturatedMultiply(a, b)); } } } @GwtIncompatible // TODO public void testSaturatedPow() { for (int a : ALL_INTEGER_CANDIDATES) { for (int b : EXPONENTS) { assertOperationEquals( a, b, "s^", saturatedCast(valueOf(a).pow(b)), IntMath.saturatedPow(a, b)); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 23.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
b, "s*", saturatedCast(valueOf(a).multiply(valueOf(b))), IntMath.saturatedMultiply(a, b)); } } } @GwtIncompatible // TODO public void testSaturatedPow() { for (int a : ALL_INTEGER_CANDIDATES) { for (int b : EXPONENTS) { assertOperationEquals( a, b, "s^", saturatedCast(valueOf(a).pow(b)), IntMath.saturatedPow(a, b)); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 23.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/CharsTest.java
for (char value : VALUES) { assertThat(Chars.saturatedCast((long) value)).isEqualTo(value); } assertThat(Chars.saturatedCast(GREATEST + 1L)).isEqualTo(GREATEST); assertThat(Chars.saturatedCast(LEAST - 1L)).isEqualTo(LEAST); assertThat(Chars.saturatedCast(Long.MAX_VALUE)).isEqualTo(GREATEST); assertThat(Chars.saturatedCast(Long.MIN_VALUE)).isEqualTo(LEAST); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 25.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/LongMathTest.java
b, "s*", saturatedCast(valueOf(a).multiply(valueOf(b))), LongMath.saturatedMultiply(a, b)); } } } @GwtIncompatible // TODO public void testSaturatedPow() { for (long a : ALL_LONG_CANDIDATES) { for (int b : EXPONENTS) { assertOperationEquals( a, b, "s^", saturatedCast(valueOf(a).pow(b)), LongMath.saturatedPow(a, b)); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 15:00:32 UTC 2024 - 30.6K 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(@CheckForNull Object element) { return contents.get(element); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Nov 30 21:54:06 UTC 2023 - 4.1K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 4.3K bytes - Viewed (0) -
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); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 29.1K 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 // serialization @GwtIncompatible // serialization
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 22 21:19:52 UTC 2024 - 3.3K bytes - Viewed (0)