- Sort Score
- Num 10 results
- Language All
Results 1 - 7 of 7 for checkNoOverflow (0.65 seconds)
-
android/guava/src/com/google/common/math/IntMath.java
return (k == 0) ? 1 : 0; case 1: return 1; case -1: return ((k & 1) == 0) ? 1 : -1; case 2: checkNoOverflow(k < Integer.SIZE - 1, "checkedPow", b, k); return 1 << k; case -2: checkNoOverflow(k < Integer.SIZE, "checkedPow", b, k); return ((k & 1) == 0) ? 1 << k : -1 << k; default: // continue below to handle the general case
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) -
android/guava/src/com/google/common/primitives/Floats.java
length += array.length; } float[] result = new float[checkNoOverflow(length)]; int pos = 0; for (float[] array : arrays) { System.arraycopy(array, 0, result, pos, array.length); pos += array.length; } return result; } private static int checkNoOverflow(long result) { checkArgument( result == (int) result,Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 23 16:38:16 GMT 2026 - 25.6K bytes - Click Count (0) -
android/guava/src/com/google/common/math/LongMath.java
case 1: return 1; case -1: return ((k & 1) == 0) ? 1 : -1; case 2: checkNoOverflow(k < Long.SIZE - 1, "checkedPow", b, k); return 1L << k; case -2: checkNoOverflow(k < Long.SIZE, "checkedPow", b, k); return ((k & 1) == 0) ? (1L << k) : (-1L << k); default: throw new AssertionError(); }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 09 23:01:02 GMT 2026 - 46.8K bytes - Click Count (0) -
android/guava/src/com/google/common/primitives/Doubles.java
length += array.length; } double[] result = new double[checkNoOverflow(length)]; int pos = 0; for (double[] array : arrays) { System.arraycopy(array, 0, result, pos, array.length); pos += array.length; } return result; } private static int checkNoOverflow(long result) { checkArgument( result == (int) result,Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 23 16:38:16 GMT 2026 - 27.8K bytes - Click Count (0) -
android/guava/src/com/google/common/primitives/Ints.java
for (int[] array : arrays) { length += array.length; } int[] result = new int[checkNoOverflow(length)]; int pos = 0; for (int[] array : arrays) { System.arraycopy(array, 0, result, pos, array.length); pos += array.length; } return result; } private static int checkNoOverflow(long result) { checkArgument( result == (int) result,
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 16:45:58 GMT 2026 - 31.3K bytes - Click Count (0) -
guava-tests/test/com/google/common/math/MathPreconditionsTest.java
} public void testCheckNoOverflow_success() { MathPreconditions.checkNoOverflow(true, "testCheckNoOverflow_success", 0, 0); } public void testCheckNoOverflow_failure() { ArithmeticException expected = assertThrows( ArithmeticException.class, () -> MathPreconditions.checkNoOverflow(false, "testCheckNoOverflow_failure", 0, 0));
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 03 05:21:26 GMT 2026 - 8.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/math/MathPreconditionsTest.java
} public void testCheckNoOverflow_success() { MathPreconditions.checkNoOverflow(true, "testCheckNoOverflow_success", 0, 0); } public void testCheckNoOverflow_failure() { ArithmeticException expected = assertThrows( ArithmeticException.class, () -> MathPreconditions.checkNoOverflow(false, "testCheckNoOverflow_failure", 0, 0));
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 03 05:21:26 GMT 2026 - 8.1K bytes - Click Count (0)