Package com.google.common.primitives
Class UnsignedLongs.ParseOverflowDetection
java.lang.Object
com.google.common.primitives.UnsignedLongs.ParseOverflowDetection
- Enclosing class:
UnsignedLongs
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int[]
(package private) static final long[]
(package private) static final int[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static boolean
overflowInParse
(long current, int digit, int radix) Returns true if (current * radix) + digit is a number too large to be represented by an unsigned long.
-
Field Details
-
maxValueDivs
static final long[] maxValueDivs -
maxValueMods
static final int[] maxValueMods -
maxSafeDigits
static final int[] maxSafeDigits
-
-
Constructor Details
-
ParseOverflowDetection
private ParseOverflowDetection()
-
-
Method Details
-
overflowInParse
static boolean overflowInParse(long current, int digit, int radix) Returns true if (current * radix) + digit is a number too large to be represented by an unsigned long. This is useful for detecting overflow while parsing a string representation of a number. Does not verify whether supplied radix is valid, passing an invalid radix will give undefined results or an ArrayIndexOutOfBoundsException.
-