Home | History | Annotate | Download | only in phonenumbers

Lines Matching refs:nextChar

254    * @param nextChar  the most recently entered digit of a phone number. Formatting characters are
260 public String inputDigit(char nextChar) {
261 currentOutput = inputDigitWithOptionToRememberPosition(nextChar, false);
266 * Same as {@link #inputDigit}, but remembers the position where {@code nextChar} is inserted, so
269 * inserted/removed in front of {@code nextChar}.
271 public String inputDigitAndRememberPosition(char nextChar) {
272 currentOutput = inputDigitWithOptionToRememberPosition(nextChar, true);
277 private String inputDigitWithOptionToRememberPosition(char nextChar, boolean rememberPosition) {
278 accruedInput.append(nextChar);
284 if (!isDigitOrLeadingPlusSign(nextChar)) {
291 nextChar = normalizeAndAccrueDigitsAndPlusSign(nextChar, rememberPosition);
324 String tempNationalNumber = inputDigitHelper(nextChar);
344 private boolean isDigitOrLeadingPlusSign(char nextChar) {
345 return Character.isDigit(nextChar) ||
347 PhoneNumberUtil.PLUS_CHARS_PATTERN.matcher(Character.toString(nextChar)).matches());
487 // Accrues digits and the plus sign to accruedInputWithoutFormatting for later use. If nextChar
489 // normalized to the ASCII version. The return value is nextChar itself, or its normalized
490 // version, if nextChar is a digit in non-ASCII format. This method assumes its input is either a
492 private char normalizeAndAccrueDigitsAndPlusSign(char nextChar, boolean rememberPosition) {
494 if (nextChar == PhoneNumberUtil.PLUS_SIGN) {
495 normalizedChar = nextChar;
496 accruedInputWithoutFormatting.append(nextChar);
499 normalizedChar = Character.forDigit(Character.digit(nextChar, radix), radix);
509 private String inputDigitHelper(char nextChar) {
512 String tempTemplate = digitMatcher.replaceFirst(Character.toString(nextChar));