Class UnsignedLongs.ParseOverflowDetection

java.lang.Object
com.google.common.primitives.UnsignedLongs.ParseOverflowDetection
Enclosing class:
UnsignedLongs

private static final class UnsignedLongs.ParseOverflowDetection extends Object
  • 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.