- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for saturatedCast (0.1 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-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/ImmutableRangeSet.java
total += ContiguousSet.create(range, domain).size(); if (total >= Integer.MAX_VALUE) { break; } } result = size = Ints.saturatedCast(total); } return result.intValue(); } @Override public UnmodifiableIterator<C> iterator() { return new AbstractIterator<C>() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 27K bytes - Viewed (0) -
guava/src/com/google/common/collect/AbstractMapBasedMultiset.java
size = 0L; } @Override int distinctElements() { return backingMap.size(); } // Optimizations - Query Operations @Override public int size() { return Ints.saturatedCast(size); } @Override public Iterator<E> iterator() { return new MapBasedMultisetIterator(); } /* * Not subclassing AbstractMultiset$MultisetIterator because next() needs to
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 10.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/TreeMultiset.java
+ aggregateAboveRange(aggr, node.left); } } @Override public int size() { return Ints.saturatedCast(aggregateForEntries(Aggregate.SIZE)); } @Override int distinctElements() { return Ints.saturatedCast(aggregateForEntries(Aggregate.DISTINCT)); } static int distinctElements(@CheckForNull AvlNode<?> node) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 34.1K bytes - Viewed (0)