Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 24 of 24 for checkedCast (0.15 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
Back to top