public final class Numbers extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
parseUnsignedInt(String s,
int radix)
Counterpart of
Integer.parseInt(String, int) for parsing unsigned integers. |
static long |
parseUnsignedLong(String s,
int radix)
Counterpart of
Long.parseLong(String, int) for parsing unsigned integers. |
public static int parseUnsignedInt(@Nullable String s, int radix) throws NumberFormatException
Integer.parseInt(String, int) for parsing unsigned integers.
Redundant with java.lang.Integer.parseUnsignedInt(String, int radix), which is available since Java 8.
NumberFormatException - s is null or emptyNumberFormatException - radix is out of range (see Character.digit(char, int))NumberFormatException - The value represented by s is larger than 232 - 1NumberFormatException - s contains characters that are not valid digits
for the given radix (see Character.digit(char, int))public static long parseUnsignedLong(@Nullable String s, int radix) throws NumberFormatException
Long.parseLong(String, int) for parsing unsigned integers.
Redundant with java.lang.Long.parseUnsignedLong(String, int radix), which is available since Java 8.
NumberFormatException - s is null or emptyNumberFormatException - radix is out of range (see Character.digit(char, int))NumberFormatException - The value represented by s is larger than 264 - 1NumberFormatException - s contains characters that are not valid digits
for the given radix (see Character.digit(char, int))Copyright © 2019. All rights reserved.