Top Description Fields Constructors Methods
org.codehaus.commons.compiler.util

public final Class Numbers

extends Object
Class Inheritance
Imports
org.codehaus.commons.nullanalysis.Nullable

Utility methods related to Number.

Field Summary

Modifier and TypeField and Description
private static final int[]
private static final long[]

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

0 through 232 - 1
parseUnsignedInt
(String s, int radix)

Counterpart of Integer#parseInt(String, int) for parsing unsigned integers.

public static long

Returns:

0 through 264 - 1
parseUnsignedLong
(String s, int radix)

Counterpart of Long#parseLong(String, int) for parsing unsigned integers.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INT_LIMITSback to summary
private static final int[] INT_LIMITS
LONG_LIMITSback to summary
private static final long[] LONG_LIMITS

Constructor Detail

Numbersback to summary
private Numbers()

Method Detail

parseUnsignedIntback to summary
public static int parseUnsignedInt(String s, int radix) throws NumberFormatException

Counterpart of Integer#parseInt(String, int) for parsing unsigned integers.

Redundant with java.lang.Integer.parseUnsignedInt(String, int radix), which is available since Java 8.

Returns:int

0 through 232 - 1

Exceptions
NumberFormatException:
parseUnsignedLongback to summary
public static long parseUnsignedLong(String s, int radix) throws NumberFormatException

Counterpart of Long#parseLong(String, int) for parsing unsigned integers.

Redundant with java.lang.Long.parseUnsignedLong(String, int radix), which is available since Java 8.

Returns:long

0 through 264 - 1

Exceptions
NumberFormatException: