code: @Override
      public Number parse(String text, ParsePosition parsePosition) {
          long num = 0;
          boolean sawNumber = false;
          boolean negative = false;
          int base = parsePosition.getIndex();
          int offset = 0;
          for (; base + offset < text.length(); offset++) {
              char ch = text.charAt(base + offset);
              if (offset == 0 && ch == minusSign) {
                  if (positiveOnly) {
                      break;
                  }
                  negative = true;
              } else {
                  int digit = ch - digits[0];
                  if (digit < 0 || 9 < digit) {
                      digit = UCharacter.digit(ch);
                  }
                  if (digit < 0 || 9 < digit) {
                      for ( digit = 0 ; digit < 10 ; digit++ ) {
                          if ( ch == digits[digit]) {
                              break;
                          }
                      }
                  }
                  if (0 <= digit && digit <= 9 && num < PARSE_THRESHOLD) {
                      sawNumber = true;
                      num = num * 10 + digit;
                  } else {
                      break;
                  }
              }
          }
          Number result = null;
          if (sawNumber) {
              num = negative ? num * (-1) : num;
              result = Long.valueOf(num);
              parsePosition.setIndex(base + offset);
          }
          return result;
      }
docs: (Long.MAX_VALUE / 10) - 1