Home | History | Annotate | Download | only in phonenumbers

Lines Matching refs:nextChar

269    * @param nextChar  the most recently entered digit of a phone number. Formatting characters are
275 public String inputDigit(char nextChar) {
276 currentOutput = inputDigitWithOptionToRememberPosition(nextChar, false);
281 * Same as {@link #inputDigit}, but remembers the position where {@code nextChar} is inserted, so
284 * inserted/removed in front of {@code nextChar}.
286 public String inputDigitAndRememberPosition(char nextChar) {
287 currentOutput = inputDigitWithOptionToRememberPosition(nextChar, true);
292 private String inputDigitWithOptionToRememberPosition(char nextChar, boolean rememberPosition) {
293 accruedInput.append(nextChar);
299 if (!isDigitOrLeadingPlusSign(nextChar)) {
303 nextChar = normalizeAndAccrueDigitsAndPlusSign(nextChar, rememberPosition);
346 String tempNationalNumber = inputDigitHelper(nextChar);
388 private boolean isDigitOrLeadingPlusSign(char nextChar) {
389 return Character.isDigit(nextChar) ||
391 PhoneNumberUtil.PLUS_CHARS_PATTERN.matcher(Character.toString(nextChar)).matches());
536 // Accrues digits and the plus sign to accruedInputWithoutFormatting for later use. If nextChar
538 // normalized to the ASCII version. The return value is nextChar itself, or its normalized
539 // version, if nextChar is a digit in non-ASCII format. This method assumes its input is either a
541 private char normalizeAndAccrueDigitsAndPlusSign(char nextChar, boolean rememberPosition) {
543 if (nextChar == PhoneNumberUtil.PLUS_SIGN) {
544 normalizedChar = nextChar;
545 accruedInputWithoutFormatting.append(nextChar);
548 normalizedChar = Character.forDigit(Character.digit(nextChar, radix), radix);
558 private String inputDigitHelper(char nextChar) {
561 String tempTemplate = digitMatcher.replaceFirst(Character.toString(nextChar));