- Sort Score
- Result 10 results
- Languages All
Results 21 - 29 of 29 for checkedCast (0.16 sec)
-
android/guava-tests/test/com/google/common/primitives/CharsTest.java
for (char value : VALUES) { assertThat(Chars.hashCode(value)).isEqualTo(((Character) value).hashCode()); } } public void testCheckedCast() { for (char value : VALUES) { assertThat(Chars.checkedCast((long) value)).isEqualTo(value); } assertCastFails(GREATEST + 1L); assertCastFails(LEAST - 1L); assertCastFails(Long.MAX_VALUE); assertCastFails(Long.MIN_VALUE); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 20 17:00:05 GMT 2024 - 24.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/primitives/CharsTest.java
for (char value : VALUES) { assertThat(Chars.hashCode(value)).isEqualTo(((Character) value).hashCode()); } } public void testCheckedCast() { for (char value : VALUES) { assertThat(Chars.checkedCast((long) value)).isEqualTo(value); } assertCastFails(GREATEST + 1L); assertCastFails(LEAST - 1L); assertCastFails(Long.MAX_VALUE); assertCastFails(Long.MIN_VALUE); }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 20 17:00:05 GMT 2024 - 24.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/BloomFilterTest.java
@AndroidIncompatible // slow public void testBitSize() { double fpp = 0.03; for (int i = 1; i < 10000; i++) { long numBits = BloomFilter.optimalNumOfBits(i, fpp); int arraySize = Ints.checkedCast(LongMath.divide(numBits, 64, RoundingMode.CEILING)); assertEquals( arraySize * Long.SIZE, BloomFilter.create(Funnels.unencodedCharsFunnel(), i, fpp).bitSize()); } }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Thu Nov 09 22:49:56 GMT 2023 - 21.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/BloomFilterTest.java
@AndroidIncompatible // slow public void testBitSize() { double fpp = 0.03; for (int i = 1; i < 10000; i++) { long numBits = BloomFilter.optimalNumOfBits(i, fpp); int arraySize = Ints.checkedCast(LongMath.divide(numBits, 64, RoundingMode.CEILING)); assertEquals( arraySize * Long.SIZE, BloomFilter.create(Funnels.unencodedCharsFunnel(), i, fpp).bitSize()); } }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Nov 09 22:49:56 GMT 2023 - 21.3K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/Chars.java
* @throws IllegalArgumentException if {@code value} is greater than {@link Character#MAX_VALUE} * or less than {@link Character#MIN_VALUE} */ public static char checkedCast(long value) { char result = (char) value; checkArgument(result == value, "Out of range: %s", value); return result; } /** * Returns the {@code char} nearest in value to {@code value}. *
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 23.5K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/Shorts.java
* @throws IllegalArgumentException if {@code value} is greater than {@link Short#MAX_VALUE} or * less than {@link Short#MIN_VALUE} */ public static short checkedCast(long value) { short result = (short) value; checkArgument(result == value, "Out of range: %s", value); return result; } /** * Returns the {@code short} nearest in value to {@code value}. *
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 25.1K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/Ints.java
* @throws IllegalArgumentException if {@code value} is greater than {@link Integer#MAX_VALUE} or * less than {@link Integer#MIN_VALUE} */ public static int checkedCast(long value) { int result = (int) value; checkArgument(result == value, "Out of range: %s", value); return result; } /** * Returns the {@code int} nearest in value to {@code value}. *
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 29.7K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/TestsForListsInJavaUtil.java
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 12.1K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/TestsForListsInJavaUtil.java
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 11.6K bytes - Viewed (0)