Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for parseUnsignedInt (0.11 sec)

  1. android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

        }
      }
    
      public void testParseInt() {
        for (long a : UNSIGNED_INTS) {
          assertThat(UnsignedInts.parseUnsignedInt(Long.toString(a))).isEqualTo((int) a);
        }
      }
    
      public void testParseIntFail() {
        assertThrows(
            NumberFormatException.class, () -> UnsignedInts.parseUnsignedInt(Long.toString(1L << 32)));
      }
    
      public void testParseIntWithRadix() {
        for (long a : UNSIGNED_INTS) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/primitives/UnsignedInts.java

       *
       * <p><b>Java 8+ users:</b> use {@link Integer#parseUnsignedInt(String)} instead.
       *
       * @throws NumberFormatException if the string does not contain a valid unsigned {@code int} value
       * @throws NullPointerException if {@code s} is null (in contrast to {@link
       *     Integer#parseInt(String)})
       */
      @CanIgnoreReturnValue
      public static int parseUnsignedInt(String s) {
        return parseUnsignedInt(s, 10);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 21:17:54 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  3. guava/src/com/google/common/primitives/UnsignedInts.java

       *
       * <p><b>Java 8+ users:</b> use {@link Integer#parseUnsignedInt(String)} instead.
       *
       * @throws NumberFormatException if the string does not contain a valid unsigned {@code int} value
       * @throws NullPointerException if {@code s} is null (in contrast to {@link
       *     Integer#parseInt(String)})
       */
      @CanIgnoreReturnValue
      public static int parseUnsignedInt(String s) {
        return parseUnsignedInt(s, 10);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 21:17:54 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/primitives/UnsignedInteger.java

       *     value
       */
      public static UnsignedInteger valueOf(String string, int radix) {
        return fromIntBits(UnsignedInts.parseUnsignedInt(string, radix));
      }
    
      /**
       * Returns the result of adding this and {@code val}. If the result would have more than 32 bits,
       * returns the low 32 bits of the result.
       *
       * @since 14.0
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 23 18:45:50 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  5. guava/src/com/google/common/primitives/UnsignedInteger.java

       *     value
       */
      public static UnsignedInteger valueOf(String string, int radix) {
        return fromIntBits(UnsignedInts.parseUnsignedInt(string, radix));
      }
    
      /**
       * Returns the result of adding this and {@code val}. If the result would have more than 32 bits,
       * returns the low 32 bits of the result.
       *
       * @since 14.0
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 23 18:45:50 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/base/Converter.java

     *       return Integer.toHexString(i);
     *     }
     *
     *     protected Integer doBackward(String s) {
     *       return parseUnsignedInt(s, 16);
     *     }
     *   };</pre>
     *
     * <p>An alternative using Java 8:
     *
     * <pre>{@code
     * return Converter.from(
     *     Integer::toHexString,
     *     s -> parseUnsignedInt(s, 16));
     * }</pre>
     *
     * @author Mike Ward
     * @author Kurt Alfred Kluever
     * @author Gregory Kick
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 15 16:12:13 UTC 2024
    - 23K bytes
    - Viewed (0)
Back to top