diff --git a/javadoc/allclasses-frame.html b/javadoc/allclasses-frame.html new file mode 100644 index 0000000000..8fcc0995b5 --- /dev/null +++ b/javadoc/allclasses-frame.html @@ -0,0 +1,49 @@ + + + +
+ +
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++com.google.i18n.phonenumbers.AsYouTypeFormatter +
public class AsYouTypeFormatter
+A formatter which formats phone numbers as they are entered. + +
An AsYouTypeFormatter can be created by invoking
+ PhoneNumberUtil#getAsYouTypeFormatter
. After that, digits can be added by invoking
+ inputDigit(char)
on the formatter instance, and the partially formatted phone number will be
+ returned each time a digit is added. clear()
can be invoked before formatting a new
+ number.
+
+
See the unittests for more details on how the formatter is to be used. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+clear()
+
++ Clears the internal state of the formatter, so it can be reused. |
+
+ int |
+getRememberedPosition()
+
++ Returns the current position in the partially formatted phone number of the character which was + previously passed in as the parameter of inputDigitAndRememberPosition(char) . |
+
+ java.lang.String |
+inputDigit(char nextChar)
+
++ Formats a phone number on-the-fly as each digit is entered. |
+
+ java.lang.String |
+inputDigitAndRememberPosition(char nextChar)
+
++ Same as inputDigit(char) , but remembers the position where nextChar is inserted, so
+ that it can be retrieved later by using getRememberedPosition() . |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Method Detail | +
---|
+public void clear()+
+
+public java.lang.String inputDigit(char nextChar)+
+
nextChar
- the most recently entered digit of a phone number. Formatting characters are
+ allowed, but as soon as they are encountered this method formats the number as entered and
+ not "as you type" anymore. Full width digits and Arabic-indic digits are allowed, and will
+ be shown as they are.
++public java.lang.String inputDigitAndRememberPosition(char nextChar)+
inputDigit(char)
, but remembers the position where nextChar
is inserted, so
+ that it can be retrieved later by using getRememberedPosition()
. The remembered
+ position will be automatically adjusted if additional formatting characters are later
+ inserted/removed in front of nextChar
.
++
+public int getRememberedPosition()+
inputDigitAndRememberPosition(char)
.
++
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | ++DETAIL: ENUM CONSTANTS | FIELD | METHOD | +
+java.lang.Object ++java.lang.Enum<NumberParseException.ErrorType> +
com.google.i18n.phonenumbers.NumberParseException.ErrorType +
public static enum NumberParseException.ErrorType
+
+Enum Constant Summary | +|
---|---|
INVALID_COUNTRY_CODE
+
++ |
+|
NOT_A_NUMBER
+
++ |
+|
TOO_LONG
+
++ |
+|
TOO_SHORT_AFTER_IDD
+
++ |
+|
TOO_SHORT_NSN
+
++ |
+
+Method Summary | +|
---|---|
+static NumberParseException.ErrorType |
+valueOf(java.lang.String name)
+
++ Returns the enum constant of this type with the specified name. |
+
+static NumberParseException.ErrorType[] |
+values()
+
++ Returns an array containing the constants of this enum type, in +the order they are declared. |
+
Methods inherited from class java.lang.Enum | +
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
+
Methods inherited from class java.lang.Object | +
---|
getClass, notify, notifyAll, wait, wait, wait |
+
+Enum Constant Detail | +
---|
+public static final NumberParseException.ErrorType INVALID_COUNTRY_CODE+
+public static final NumberParseException.ErrorType NOT_A_NUMBER+
+public static final NumberParseException.ErrorType TOO_SHORT_AFTER_IDD+
+public static final NumberParseException.ErrorType TOO_SHORT_NSN+
+public static final NumberParseException.ErrorType TOO_LONG+
+Method Detail | +
---|
+public static NumberParseException.ErrorType[] values()+
+for (NumberParseException.ErrorType c : NumberParseException.ErrorType.values()) + System.out.println(c); ++
+
+public static NumberParseException.ErrorType valueOf(java.lang.String name)+
+
name
- the name of the enum constant to be returned.
+java.lang.IllegalArgumentException
- if this enum type has no constant
+with the specified name
+java.lang.NullPointerException
- if the argument is null
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | ++DETAIL: ENUM CONSTANTS | FIELD | METHOD | +
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.lang.Throwable +
java.lang.Exception +
com.google.i18n.phonenumbers.NumberParseException +
public class NumberParseException
+Generic exception class for errors encountered when parsing phone numbers. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+NumberParseException.ErrorType
+
++ |
+
+Constructor Summary | +|
---|---|
NumberParseException(NumberParseException.ErrorType errorType,
+ java.lang.String message)
+
++ |
+
+Method Summary | +|
---|---|
+ NumberParseException.ErrorType |
+getErrorType()
+
++ Returns the error type of the exception that has been thrown. |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Throwable | +
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
---|
+public NumberParseException(NumberParseException.ErrorType errorType, + java.lang.String message)+
+Method Detail | +
---|
+public NumberParseException.ErrorType getErrorType()+
+
+public java.lang.String toString()+
toString
in class java.lang.Throwable
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++com.google.i18n.phonenumbers.PhoneNumberMatch +
public final class PhoneNumberMatch
+The immutable match of a phone number within a piece of text. Matches may be found using
+ PhoneNumberUtil#findNumbers
.
+
+
A match consists of the phone number as well as the
+ start and end offsets of the corresponding subsequence
+ of the searched text. Use rawString()
to obtain a copy of the matched subsequence.
+
+
The following annotated example clarifies the relationship between the searched text, the + match offsets, and the parsed number: + +
+ CharSequence text = "Call me at +1 425 882-8080 for details.";
+ RegionCode country = RegionCode.US;
+ PhoneNumberUtil util = PhoneNumberUtil.getInstance();
+
+ // Find the first phone number match:
+ PhoneNumberMatch m = util.findNumbers(text, country).iterator().next();
+
+ // rawString() contains the phone number as it appears in the text.
+ "+1 425 882-8080".equals(m.rawString());
+
+ // start() and end() define the range of the matched subsequence.
+ CharSequence subsequence = text.subSequence(m.start(), m.end());
+ "+1 425 882-8080".contentEquals(subsequence);
+
+ // number() returns the the same result as PhoneNumberUtil.parse()
+ // invoked on rawString().
+ util.parse(m.rawString(), country).equals(m.number());
+
++ +
+
+Method Summary | +|
---|---|
+ int |
+end()
+
++ Returns the exclusive end index of the matched phone number within the searched text. |
+
+ boolean |
+equals(java.lang.Object obj)
+
++ |
+
+ int |
+hashCode()
+
++ |
+
+ PhoneNumber |
+number()
+
++ Returns the phone number matched by the receiver. |
+
+ java.lang.String |
+rawString()
+
++ Returns the raw string matched as a phone number in the searched text. |
+
+ int |
+start()
+
++ Returns the start index of the matched phone number within the searched text. |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
+
+Method Detail | +
---|
+public PhoneNumber number()+
+
+public int start()+
+
+public int end()+
+
+public java.lang.String rawString()+
+
+public int hashCode()+
hashCode
in class java.lang.Object
+public boolean equals(java.lang.Object obj)+
equals
in class java.lang.Object
+public java.lang.String toString()+
toString
in class java.lang.Object
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | ++DETAIL: ENUM CONSTANTS | FIELD | METHOD | +
+java.lang.Object ++java.lang.Enum<PhoneNumberUtil.Leniency> +
com.google.i18n.phonenumbers.PhoneNumberUtil.Leniency +
public static enum PhoneNumberUtil.Leniency
+Leniency when finding potential phone numbers in text + segments. +
+ +
+
+Enum Constant Summary | +|
---|---|
POSSIBLE
+
++ Phone numbers accepted are possible, but not necessarily valid. |
+|
VALID
+
++ Phone numbers accepted are possible and valid. |
+
+Method Summary | +|
---|---|
+static PhoneNumberUtil.Leniency |
+valueOf(java.lang.String name)
+
++ Returns the enum constant of this type with the specified name. |
+
+static PhoneNumberUtil.Leniency[] |
+values()
+
++ Returns an array containing the constants of this enum type, in +the order they are declared. |
+
Methods inherited from class java.lang.Enum | +
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
+
Methods inherited from class java.lang.Object | +
---|
getClass, notify, notifyAll, wait, wait, wait |
+
+Enum Constant Detail | +
---|
+public static final PhoneNumberUtil.Leniency POSSIBLE+
+
+public static final PhoneNumberUtil.Leniency VALID+
+
+Method Detail | +
---|
+public static PhoneNumberUtil.Leniency[] values()+
+for (PhoneNumberUtil.Leniency c : PhoneNumberUtil.Leniency.values()) + System.out.println(c); ++
+
+public static PhoneNumberUtil.Leniency valueOf(java.lang.String name)+
+
name
- the name of the enum constant to be returned.
+java.lang.IllegalArgumentException
- if this enum type has no constant
+with the specified name
+java.lang.NullPointerException
- if the argument is null
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | ++DETAIL: ENUM CONSTANTS | FIELD | METHOD | +
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | ++DETAIL: ENUM CONSTANTS | FIELD | METHOD | +
+java.lang.Object ++java.lang.Enum<PhoneNumberUtil.MatchType> +
com.google.i18n.phonenumbers.PhoneNumberUtil.MatchType +
public static enum PhoneNumberUtil.MatchType
+Types of phone number matches. See detailed description beside the isNumberMatch() method. +
+ +
+
+Enum Constant Summary | +|
---|---|
EXACT_MATCH
+
++ |
+|
NO_MATCH
+
++ |
+|
NOT_A_NUMBER
+
++ |
+|
NSN_MATCH
+
++ |
+|
SHORT_NSN_MATCH
+
++ |
+
+Method Summary | +|
---|---|
+static PhoneNumberUtil.MatchType |
+valueOf(java.lang.String name)
+
++ Returns the enum constant of this type with the specified name. |
+
+static PhoneNumberUtil.MatchType[] |
+values()
+
++ Returns an array containing the constants of this enum type, in +the order they are declared. |
+
Methods inherited from class java.lang.Enum | +
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
+
Methods inherited from class java.lang.Object | +
---|
getClass, notify, notifyAll, wait, wait, wait |
+
+Enum Constant Detail | +
---|
+public static final PhoneNumberUtil.MatchType NOT_A_NUMBER+
+public static final PhoneNumberUtil.MatchType NO_MATCH+
+public static final PhoneNumberUtil.MatchType SHORT_NSN_MATCH+
+public static final PhoneNumberUtil.MatchType NSN_MATCH+
+public static final PhoneNumberUtil.MatchType EXACT_MATCH+
+Method Detail | +
---|
+public static PhoneNumberUtil.MatchType[] values()+
+for (PhoneNumberUtil.MatchType c : PhoneNumberUtil.MatchType.values()) + System.out.println(c); ++
+
+public static PhoneNumberUtil.MatchType valueOf(java.lang.String name)+
+
name
- the name of the enum constant to be returned.
+java.lang.IllegalArgumentException
- if this enum type has no constant
+with the specified name
+java.lang.NullPointerException
- if the argument is null
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | ++DETAIL: ENUM CONSTANTS | FIELD | METHOD | +
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | ++DETAIL: ENUM CONSTANTS | FIELD | METHOD | +
+java.lang.Object ++java.lang.Enum<PhoneNumberUtil.PhoneNumberFormat> +
com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat +
public static enum PhoneNumberUtil.PhoneNumberFormat
+INTERNATIONAL and NATIONAL formats are consistent with the definition in ITU-T Recommendation + E. 123. For example, the number of the Google Zurich office will be written as + "+41 44 668 1800" in INTERNATIONAL format, and as "044 668 1800" in NATIONAL format. + E164 format is as per INTERNATIONAL format but with no formatting applied, e.g. +41446681800. + RFC3966 is as per INTERNATIONAL format, but with all spaces and other separating symbols + replaced with a hyphen, and with any phone number extension appended with ";ext=". + + Note: If you are considering storing the number in a neutral format, you are highly advised to + use the PhoneNumber class. +
+ +
+
+Enum Constant Summary | +|
---|---|
E164
+
++ |
+|
INTERNATIONAL
+
++ |
+|
NATIONAL
+
++ |
+|
RFC3966
+
++ |
+
+Method Summary | +|
---|---|
+static PhoneNumberUtil.PhoneNumberFormat |
+valueOf(java.lang.String name)
+
++ Returns the enum constant of this type with the specified name. |
+
+static PhoneNumberUtil.PhoneNumberFormat[] |
+values()
+
++ Returns an array containing the constants of this enum type, in +the order they are declared. |
+
Methods inherited from class java.lang.Enum | +
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
+
Methods inherited from class java.lang.Object | +
---|
getClass, notify, notifyAll, wait, wait, wait |
+
+Enum Constant Detail | +
---|
+public static final PhoneNumberUtil.PhoneNumberFormat E164+
+public static final PhoneNumberUtil.PhoneNumberFormat INTERNATIONAL+
+public static final PhoneNumberUtil.PhoneNumberFormat NATIONAL+
+public static final PhoneNumberUtil.PhoneNumberFormat RFC3966+
+Method Detail | +
---|
+public static PhoneNumberUtil.PhoneNumberFormat[] values()+
+for (PhoneNumberUtil.PhoneNumberFormat c : PhoneNumberUtil.PhoneNumberFormat.values()) + System.out.println(c); ++
+
+public static PhoneNumberUtil.PhoneNumberFormat valueOf(java.lang.String name)+
+
name
- the name of the enum constant to be returned.
+java.lang.IllegalArgumentException
- if this enum type has no constant
+with the specified name
+java.lang.NullPointerException
- if the argument is null
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | ++DETAIL: ENUM CONSTANTS | FIELD | METHOD | +
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | ++DETAIL: ENUM CONSTANTS | FIELD | METHOD | +
+java.lang.Object ++java.lang.Enum<PhoneNumberUtil.PhoneNumberType> +
com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType +
public static enum PhoneNumberUtil.PhoneNumberType
+Type of phone numbers. +
+ +
+
+Enum Constant Summary | +|
---|---|
FIXED_LINE
+
++ |
+|
FIXED_LINE_OR_MOBILE
+
++ |
+|
MOBILE
+
++ |
+|
PAGER
+
++ |
+|
PERSONAL_NUMBER
+
++ |
+|
PREMIUM_RATE
+
++ |
+|
SHARED_COST
+
++ |
+|
TOLL_FREE
+
++ |
+|
UAN
+
++ |
+|
UNKNOWN
+
++ |
+|
VOIP
+
++ |
+
+Method Summary | +|
---|---|
+static PhoneNumberUtil.PhoneNumberType |
+valueOf(java.lang.String name)
+
++ Returns the enum constant of this type with the specified name. |
+
+static PhoneNumberUtil.PhoneNumberType[] |
+values()
+
++ Returns an array containing the constants of this enum type, in +the order they are declared. |
+
Methods inherited from class java.lang.Enum | +
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
+
Methods inherited from class java.lang.Object | +
---|
getClass, notify, notifyAll, wait, wait, wait |
+
+Enum Constant Detail | +
---|
+public static final PhoneNumberUtil.PhoneNumberType FIXED_LINE+
+public static final PhoneNumberUtil.PhoneNumberType MOBILE+
+public static final PhoneNumberUtil.PhoneNumberType FIXED_LINE_OR_MOBILE+
+public static final PhoneNumberUtil.PhoneNumberType TOLL_FREE+
+public static final PhoneNumberUtil.PhoneNumberType PREMIUM_RATE+
+public static final PhoneNumberUtil.PhoneNumberType SHARED_COST+
+public static final PhoneNumberUtil.PhoneNumberType VOIP+
+public static final PhoneNumberUtil.PhoneNumberType PERSONAL_NUMBER+
+public static final PhoneNumberUtil.PhoneNumberType PAGER+
+public static final PhoneNumberUtil.PhoneNumberType UAN+
+public static final PhoneNumberUtil.PhoneNumberType UNKNOWN+
+Method Detail | +
---|
+public static PhoneNumberUtil.PhoneNumberType[] values()+
+for (PhoneNumberUtil.PhoneNumberType c : PhoneNumberUtil.PhoneNumberType.values()) + System.out.println(c); ++
+
+public static PhoneNumberUtil.PhoneNumberType valueOf(java.lang.String name)+
+
name
- the name of the enum constant to be returned.
+java.lang.IllegalArgumentException
- if this enum type has no constant
+with the specified name
+java.lang.NullPointerException
- if the argument is null
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | ++DETAIL: ENUM CONSTANTS | FIELD | METHOD | +
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | ++DETAIL: ENUM CONSTANTS | FIELD | METHOD | +
+java.lang.Object ++java.lang.Enum<PhoneNumberUtil.ValidationResult> +
com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult +
public static enum PhoneNumberUtil.ValidationResult
+Possible outcomes when testing if a PhoneNumber is possible. +
+ +
+
+Enum Constant Summary | +|
---|---|
INVALID_COUNTRY_CODE
+
++ |
+|
IS_POSSIBLE
+
++ |
+|
TOO_LONG
+
++ |
+|
TOO_SHORT
+
++ |
+
+Method Summary | +|
---|---|
+static PhoneNumberUtil.ValidationResult |
+valueOf(java.lang.String name)
+
++ Returns the enum constant of this type with the specified name. |
+
+static PhoneNumberUtil.ValidationResult[] |
+values()
+
++ Returns an array containing the constants of this enum type, in +the order they are declared. |
+
Methods inherited from class java.lang.Enum | +
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
+
Methods inherited from class java.lang.Object | +
---|
getClass, notify, notifyAll, wait, wait, wait |
+
+Enum Constant Detail | +
---|
+public static final PhoneNumberUtil.ValidationResult IS_POSSIBLE+
+public static final PhoneNumberUtil.ValidationResult INVALID_COUNTRY_CODE+
+public static final PhoneNumberUtil.ValidationResult TOO_SHORT+
+public static final PhoneNumberUtil.ValidationResult TOO_LONG+
+Method Detail | +
---|
+public static PhoneNumberUtil.ValidationResult[] values()+
+for (PhoneNumberUtil.ValidationResult c : PhoneNumberUtil.ValidationResult.values()) + System.out.println(c); ++
+
+public static PhoneNumberUtil.ValidationResult valueOf(java.lang.String name)+
+
name
- the name of the enum constant to be returned.
+java.lang.IllegalArgumentException
- if this enum type has no constant
+with the specified name
+java.lang.NullPointerException
- if the argument is null
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | ++DETAIL: ENUM CONSTANTS | FIELD | METHOD | +
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++com.google.i18n.phonenumbers.PhoneNumberUtil +
public class PhoneNumberUtil
+Utility for international phone numbers. Functionality includes formatting, parsing and + validation. + +
If you use this library, and want to be notified about important changes, please sign up to + our mailing list. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+PhoneNumberUtil.Leniency
+
++ Leniency when finding potential phone numbers in text + segments. |
+
+static class |
+PhoneNumberUtil.MatchType
+
++ Types of phone number matches. |
+
+static class |
+PhoneNumberUtil.PhoneNumberFormat
+
++ INTERNATIONAL and NATIONAL formats are consistent with the definition in ITU-T Recommendation + E. |
+
+static class |
+PhoneNumberUtil.PhoneNumberType
+
++ Type of phone numbers. |
+
+static class |
+PhoneNumberUtil.ValidationResult
+
++ Possible outcomes when testing if a PhoneNumber is possible. |
+
+Method Summary | +|
---|---|
+static java.lang.String |
+convertAlphaCharactersInNumber(java.lang.String number)
+
++ Converts all alpha characters in a number to their respective digits on a keypad, but retains + existing formatting. |
+
+ java.lang.Iterable<PhoneNumberMatch> |
+findNumbers(java.lang.CharSequence text,
+ java.lang.String defaultRegion)
+
++ Returns an iterable over all PhoneNumberMatches in text . |
+
+ java.lang.Iterable<PhoneNumberMatch> |
+findNumbers(java.lang.CharSequence text,
+ java.lang.String defaultRegion,
+ PhoneNumberUtil.Leniency leniency,
+ long maxTries)
+
++ Returns an iterable over all PhoneNumberMatches in text . |
+
+ java.lang.String |
+format(PhoneNumber number,
+ PhoneNumberUtil.PhoneNumberFormat numberFormat)
+
++ Formats a phone number in the specified format using default rules. |
+
+ void |
+format(PhoneNumber number,
+ PhoneNumberUtil.PhoneNumberFormat numberFormat,
+ java.lang.StringBuilder formattedNumber)
+
++ |
+
+ java.lang.String |
+formatByPattern(PhoneNumber number,
+ PhoneNumberUtil.PhoneNumberFormat numberFormat,
+ java.util.List<NumberFormat> userDefinedFormats)
+
++ Formats a phone number in the specified format using client-defined formatting rules. |
+
+ java.lang.String |
+formatInOriginalFormat(PhoneNumber number,
+ java.lang.String regionCallingFrom)
+
++ Formats a phone number using the original phone number format that the number is parsed from. |
+
+ java.lang.String |
+formatNationalNumberWithCarrierCode(PhoneNumber number,
+ java.lang.String carrierCode)
+
++ Formats a phone number in national format for dialing using the carrier as specified in the + carrierCode . |
+
+ java.lang.String |
+formatNationalNumberWithPreferredCarrierCode(PhoneNumber number,
+ java.lang.String fallbackCarrierCode)
+
++ Formats a phone number in national format for dialing using the carrier as specified in the + preferredDomesticCarrierCode field of the PhoneNumber object passed in. |
+
+ java.lang.String |
+formatOutOfCountryCallingNumber(PhoneNumber number,
+ java.lang.String regionCallingFrom)
+
++ Formats a phone number for out-of-country dialing purposes. |
+
+ java.lang.String |
+formatOutOfCountryKeepingAlphaChars(PhoneNumber number,
+ java.lang.String regionCallingFrom)
+
++ Formats a phone number for out-of-country dialing purposes. |
+
+ AsYouTypeFormatter |
+getAsYouTypeFormatter(java.lang.String regionCode)
+
++ Gets an AsYouTypeFormatter for the specific region. |
+
+ int |
+getCountryCodeForRegion(java.lang.String regionCode)
+
++ Returns the country calling code for a specific region. |
+
+ PhoneNumber |
+getExampleNumber(java.lang.String regionCode)
+
++ Gets a valid number for the specified region. |
+
+ PhoneNumber |
+getExampleNumberForType(java.lang.String regionCode,
+ PhoneNumberUtil.PhoneNumberType type)
+
++ Gets a valid number for the specified region and number type. |
+
+static PhoneNumberUtil |
+getInstance()
+
++ Gets a PhoneNumberUtil instance to carry out international phone number formatting,
+ parsing, or validation. |
+
+ int |
+getLengthOfGeographicalAreaCode(PhoneNumber number)
+
++ Gets the length of the geographical area code in the nationalNumber_ field of the
+ PhoneNumber object passed in, so that clients could use it to split a national significant
+ number into geographical area code and subscriber number. |
+
+ int |
+getLengthOfNationalDestinationCode(PhoneNumber number)
+
++ Gets the length of the national destination code (NDC) from the PhoneNumber object passed in, + so that clients could use it to split a national significant number into NDC and subscriber + number. |
+
+ java.lang.String |
+getNationalSignificantNumber(PhoneNumber number)
+
++ Gets the national significant number of the a phone number. |
+
+ java.lang.String |
+getNddPrefixForRegion(java.lang.String regionCode,
+ boolean stripNonDigits)
+
++ Returns the national dialling prefix for a specific region. |
+
+ PhoneNumberUtil.PhoneNumberType |
+getNumberType(PhoneNumber number)
+
++ Gets the type of a phone number. |
+
+ java.lang.String |
+getRegionCodeForCountryCode(int countryCallingCode)
+
++ Returns the region code that matches the specific country calling code. |
+
+ java.lang.String |
+getRegionCodeForNumber(PhoneNumber number)
+
++ Returns the region where a phone number is from. |
+
+ java.util.Set<java.lang.String> |
+getSupportedRegions()
+
++ Convenience method to enable tests to get a list of what regions the library has metadata for. |
+
+ boolean |
+isAlphaNumber(java.lang.String number)
+
++ Checks if the number is a valid vanity (alpha) number such as 800 MICROSOFT. |
+
+ boolean |
+isNANPACountry(java.lang.String regionCode)
+
++ Checks if this is a region under the North American Numbering Plan Administration (NANPA). |
+
+ PhoneNumberUtil.MatchType |
+isNumberMatch(PhoneNumber firstNumberIn,
+ PhoneNumber secondNumberIn)
+
++ Takes two phone numbers and compares them for equality. |
+
+ PhoneNumberUtil.MatchType |
+isNumberMatch(PhoneNumber firstNumber,
+ java.lang.String secondNumber)
+
++ Takes two phone numbers and compares them for equality. |
+
+ boolean |
+isPossibleNumber(PhoneNumber number)
+
++ Convenience wrapper around isPossibleNumberWithReason(PhoneNumber) . |
+
+ boolean |
+isPossibleNumber(java.lang.String number,
+ java.lang.String regionDialingFrom)
+
++ Check whether a phone number is a possible number given a number in the form of a string, and + the region where the number could be dialed from. |
+
+ PhoneNumberUtil.ValidationResult |
+isPossibleNumberWithReason(PhoneNumber number)
+
++ Check whether a phone number is a possible number. |
+
+ boolean |
+isValidNumber(PhoneNumber number)
+
++ Tests whether a phone number matches a valid pattern. |
+
+ boolean |
+isValidNumberForRegion(PhoneNumber number,
+ java.lang.String regionCode)
+
++ Tests whether a phone number is valid for a certain region. |
+
+static java.lang.String |
+normalizeDigitsOnly(java.lang.String number)
+
++ Normalizes a string of characters representing a phone number. |
+
+ PhoneNumber |
+parse(java.lang.String numberToParse,
+ java.lang.String defaultRegion)
+
++ Parses a string and returns it in proto buffer format. |
+
+ void |
+parse(java.lang.String numberToParse,
+ java.lang.String defaultRegion,
+ PhoneNumber phoneNumber)
+
++ |
+
+ PhoneNumber |
+parseAndKeepRawInput(java.lang.String numberToParse,
+ java.lang.String defaultRegion)
+
++ Parses a string and returns it in proto buffer format. |
+
+ void |
+parseAndKeepRawInput(java.lang.String numberToParse,
+ java.lang.String defaultRegion,
+ PhoneNumber phoneNumber)
+
++ |
+
+ boolean |
+truncateTooLongNumber(PhoneNumber number)
+
++ Attempts to extract a valid number from a phone number that is too long to be valid, and resets + the PhoneNumber object passed in to that valid version. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Method Detail | +
---|
+public static java.lang.String normalizeDigitsOnly(java.lang.String number)+
+
number
- a string of characters representing a phone number
++public static java.lang.String convertAlphaCharactersInNumber(java.lang.String number)+
+
+public int getLengthOfGeographicalAreaCode(PhoneNumber number)+
nationalNumber_
field of the
+ PhoneNumber object passed in, so that clients could use it to split a national significant
+ number into geographical area code and subscriber number. It works in such a way that the
+ resultant subscriber number should be diallable, at least on some devices. An example of how
+ this could be used:
+
+ + PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); + PhoneNumber number = phoneUtil.parse("16502530000", "US"); + String nationalSignificantNumber = phoneUtil.getNationalSignificantNumber(number); + String areaCode; + String subscriberNumber; + + int areaCodeLength = phoneUtil.getLengthOfGeographicalAreaCode(number); + if (areaCodeLength > 0) { + areaCode = nationalSignificantNumber.substring(0, areaCodeLength); + subscriberNumber = nationalSignificantNumber.substring(areaCodeLength); + } else { + areaCode = ""; + subscriberNumber = nationalSignificantNumber; + } ++ + N.B.: area code is a very ambiguous concept, so the I18N team generally recommends against + using it for most purposes. Read the following carefully before deciding to use this method: + + - geographical area codes change over time, and this method honors those changes; therefore, + it doesn't guarantee the stability of the result it produces. + - subscriber numbers may not be diallable from all devices (notably mobile devices, which + typically requires the full national_number to be dialled in most countries). + - most non-geographical numbers have no area codes. + - some geographical numbers have no area codes. +
+
number
- the PhoneNumber object for which clients want to know the length of the area
+ code.
++public int getLengthOfNationalDestinationCode(PhoneNumber number)+
getLengthOfGeographicalAreaCode()
.
++
number
- the PhoneNumber object for which clients want to know the length of the NDC.
++public java.util.Set<java.lang.String> getSupportedRegions()+
+
+public static PhoneNumberUtil getInstance()+
PhoneNumberUtil
instance to carry out international phone number formatting,
+ parsing, or validation. The instance is loaded with phone number metadata for a number of most
+ commonly used regions.
+
+ The PhoneNumberUtil
is implemented as a singleton. Therefore, calling getInstance
+ multiple times will only result in one instance being created.
+
+
+public java.lang.String format(PhoneNumber number, + PhoneNumberUtil.PhoneNumberFormat numberFormat)+
+
number
- the phone number to be formattednumberFormat
- the format the phone number should be formatted into
++public void format(PhoneNumber number, + PhoneNumberUtil.PhoneNumberFormat numberFormat, + java.lang.StringBuilder formattedNumber)+
+public java.lang.String formatByPattern(PhoneNumber number, + PhoneNumberUtil.PhoneNumberFormat numberFormat, + java.util.List<NumberFormat> userDefinedFormats)+
+
number
- the phone number to be formattednumberFormat
- the format the phone number should be formatted intouserDefinedFormats
- formatting rules specified by clients
++public java.lang.String formatNationalNumberWithCarrierCode(PhoneNumber number, + java.lang.String carrierCode)+
carrierCode
. The carrierCode
will always be used regardless of whether the
+ phone number already has a preferred domestic carrier code stored. If carrierCode
+ contains an empty string, returns the number in national format without any carrier code.
++
number
- the phone number to be formattedcarrierCode
- the carrier selection code to be used
+carrierCode
+public java.lang.String formatNationalNumberWithPreferredCarrierCode(PhoneNumber number, + java.lang.String fallbackCarrierCode)+
fallbackCarrierCode
passed in instead. If there is no
+ preferredDomesticCarrierCode
, and the fallbackCarrierCode
contains an empty
+ string, return the number in national format without any carrier code.
+
+ Use formatNationalNumberWithCarrierCode(PhoneNumber, java.lang.String)
instead if the carrier code passed in
+ should take precedence over the number's preferredDomesticCarrierCode
when formatting.
+
+
number
- the phone number to be formattedfallbackCarrierCode
- the carrier selection code to be used, if none is found in the
+ phone number itself
+preferredDomesticCarrierCode
, or the fallbackCarrierCode
passed in if
+ none is found+public java.lang.String formatOutOfCountryCallingNumber(PhoneNumber number, + java.lang.String regionCallingFrom)+
If the number itself has a country calling code of zero or an otherwise invalid country + calling code, then we return the number with no formatting applied. + +
Note this function takes care of the case for calling inside of NANPA and between Russia and + Kazakhstan (who share the same country calling code). In those cases, no international prefix + is used. For regions which have multiple international prefixes, the number in its + INTERNATIONAL format will be returned instead. +
+
number
- the phone number to be formattedregionCallingFrom
- the ISO 3166-1 two-letter region code that denotes the region
+ where the call is being placed
++public java.lang.String formatInOriginalFormat(PhoneNumber number, + java.lang.String regionCallingFrom)+
+
number
- the phone number that needs to be formatted in its original number formatregionCallingFrom
- the region whose IDD needs to be prefixed if the original number
+ has one
++public java.lang.String formatOutOfCountryKeepingAlphaChars(PhoneNumber number, + java.lang.String regionCallingFrom)+
Caveats:
++
number
- the phone number that needs to be formattedregionCallingFrom
- the region where the call is being placed
++public java.lang.String getNationalSignificantNumber(PhoneNumber number)+
+
number
- the PhoneNumber object for which the national significant number is needed
++public PhoneNumber getExampleNumber(java.lang.String regionCode)+
+
regionCode
- the ISO 3166-1 two-letter region code that denotes
+ the region for which an example number is needed
++public PhoneNumber getExampleNumberForType(java.lang.String regionCode, + PhoneNumberUtil.PhoneNumberType type)+
+
regionCode
- the ISO 3166-1 two-letter region code that denotes
+ the region for which an example number is neededtype
- the type of number that is needed
++public PhoneNumberUtil.PhoneNumberType getNumberType(PhoneNumber number)+
+
number
- the phone number that we want to know the type
++public boolean isValidNumber(PhoneNumber number)+
+
number
- the phone number that we want to validate
++public boolean isValidNumberForRegion(PhoneNumber number, + java.lang.String regionCode)+
+
number
- the phone number that we want to validateregionCode
- the ISO 3166-1 two-letter region code that denotes the region that we want
+ to validate the phone number for
++public java.lang.String getRegionCodeForNumber(PhoneNumber number)+
+
number
- the phone number whose origin we want to know
++public java.lang.String getRegionCodeForCountryCode(int countryCallingCode)+
+
+public int getCountryCodeForRegion(java.lang.String regionCode)+
+
regionCode
- the ISO 3166-1 two-letter region code that denotes
+ the region that we want to get the country calling code for
++public java.lang.String getNddPrefixForRegion(java.lang.String regionCode, + boolean stripNonDigits)+
Warning: Do not use this method for do-your-own formatting - for some regions, the + national dialling prefix is used only for certain types of numbers. Use the library's + formatting functions to prefix the national prefix when required. +
+
regionCode
- the ISO 3166-1 two-letter region code that denotes
+ the region that we want to get the dialling prefix forstripNonDigits
- true to strip non-digits from the national dialling prefix
++public boolean isNANPACountry(java.lang.String regionCode)+
+
+public boolean isAlphaNumber(java.lang.String number)+
isPossibleNumberWithReason(PhoneNumber)
and
+ isValidNumber(PhoneNumber)
should be used.
++
number
- the number that needs to be checked
++public boolean isPossibleNumber(PhoneNumber number)+
isPossibleNumberWithReason(PhoneNumber)
. Instead of returning the reason
+ for failure, this method returns a boolean value.
++
number
- the number that needs to be checked
++public PhoneNumberUtil.ValidationResult isPossibleNumberWithReason(PhoneNumber number)+
isValidNumber(PhoneNumber)
in the following sense:
+number
- the number that needs to be checked
++public boolean isPossibleNumber(java.lang.String number, + java.lang.String regionDialingFrom)+
isValidNumber(PhoneNumber)
. See isPossibleNumber(PhoneNumber)
for details.
+
+ This method first parses the number, then invokes isPossibleNumber(PhoneNumber
+ number)
with the resultant PhoneNumber object.
+
+
number
- the number that needs to be checked, in the form of a stringregionDialingFrom
- the ISO 3166-1 two-letter region code that denotes the region that
+ we are expecting the number to be dialed from.
+ Note this is different from the region where the number belongs. For example, the number
+ +1 650 253 0000 is a number that belongs to US. When written in this form, it can be
+ dialed from any region. When it is written as 00 1 650 253 0000, it can be dialed from any
+ region which uses an international dialling prefix of 00. When it is written as
+ 650 253 0000, it can only be dialed from within the US, and when written as 253 0000, it
+ can only be dialed from within a smaller area in the US (Mountain View, CA, to be more
+ specific).
++public boolean truncateTooLongNumber(PhoneNumber number)+
+
number
- a PhoneNumber object which contains a number that is too long to be valid.
++public AsYouTypeFormatter getAsYouTypeFormatter(java.lang.String regionCode)+
AsYouTypeFormatter
for the specific region.
++
regionCode
- the ISO 3166-1 two-letter region code that denotes the region where
+ the phone number is being entered
+AsYouTypeFormatter
object, which can be used
+ to format phone numbers in the specific region "as you type"+public PhoneNumber parse(java.lang.String numberToParse, + java.lang.String defaultRegion) + throws NumberParseException+
NumberParseException
if the number is not considered to be
+ a possible number. Note that validation of whether the number is actually a valid number for a
+ particular region is not performed. This can be done separately with isValidNumber(PhoneNumber)
.
++
numberToParse
- number that we are attempting to parse. This can contain formatting
+ such as +, ( and -, as well as a phone number extension.defaultRegion
- the ISO 3166-1 two-letter region code that denotes the region that we
+ are expecting the number to be from. This is only used if the number
+ being parsed is not written in international format.
+ The country_code for the number in this case would be stored as that
+ of the default region supplied. If the number is guaranteed to
+ start with a '+' followed by the country calling code, then "ZZ" or
+ null can be supplied.
+NumberParseException
- if the string is not considered to be a viable phone number or if
+ no default region was supplied and the number is not in
+ international format (does not start with +)+public void parse(java.lang.String numberToParse, + java.lang.String defaultRegion, + PhoneNumber phoneNumber) + throws NumberParseException+
NumberParseException
+public PhoneNumber parseAndKeepRawInput(java.lang.String numberToParse, + java.lang.String defaultRegion) + throws NumberParseException+
parse(java.lang.String, java.lang.String)
+ in that it always populates the raw_input field of the protocol buffer with numberToParse as
+ well as the country_code_source field.
++
numberToParse
- number that we are attempting to parse. This can contain formatting
+ such as +, ( and -, as well as a phone number extension.defaultRegion
- the ISO 3166-1 two-letter region code that denotes the region that
+ we are expecting the number to be from. This is only used if the
+ number being parsed is not written in international format. The
+ country calling code for the number in this case would be stored as
+ that of the default region supplied.
+NumberParseException
- if the string is not considered to be a viable phone number or if
+ no default region was supplied+public void parseAndKeepRawInput(java.lang.String numberToParse, + java.lang.String defaultRegion, + PhoneNumber phoneNumber) + throws NumberParseException+
NumberParseException
+public java.lang.Iterable<PhoneNumberMatch> findNumbers(java.lang.CharSequence text, + java.lang.String defaultRegion)+
PhoneNumberMatches
in text
. This
+ is a shortcut for getMatcher(text, defaultRegion, Leniency.VALID, Long.MAX_VALUE)
.
++
text
- the text to search for phone numbers, null for no textdefaultRegion
- the ISO 3166-1 two-letter region code that denotes the region that
+ we are expecting the number to be from. This is only used if the
+ number being parsed is not written in international format. The
+ country calling code for the number in this case would be stored as
+ that of the default region supplied. May be null if only international
+ numbers are expected.+public java.lang.Iterable<PhoneNumberMatch> findNumbers(java.lang.CharSequence text, + java.lang.String defaultRegion, + PhoneNumberUtil.Leniency leniency, + long maxTries)+
PhoneNumberMatches
in text
.
++
text
- the text to search for phone numbers, null for no textdefaultRegion
- the ISO 3166-1 two-letter region code that denotes the region that
+ we are expecting the number to be from. This is only used if the
+ number being parsed is not written in international format. The
+ country calling code for the number in this case would be stored as
+ that of the default region supplied. May be null if only international
+ numbers are expected.leniency
- the leniency to use when evaluating candidate phone numbersmaxTries
- the maximum number of invalid numbers to try before giving up on the
+ text. This is to cover degenerate cases where the text has a lot of
+ false positives in it. Must be >= 0
.+public PhoneNumberUtil.MatchType isNumberMatch(PhoneNumber firstNumberIn, + PhoneNumber secondNumberIn)+
Returns EXACT_MATCH if the country_code, NSN, presence of a leading zero for Italian numbers + and any extension present are the same. + Returns NSN_MATCH if either or both has no region specified, and the NSNs and extensions are + the same. + Returns SHORT_NSN_MATCH if either or both has no region specified, or the region specified is + the same, and one NSN could be a shorter version of the other number. This includes the case + where one has an extension specified, and the other does not. + Returns NO_MATCH otherwise. + For example, the numbers +1 345 657 1234 and 657 1234 are a SHORT_NSN_MATCH. + The numbers +1 345 657 1234 and 345 657 are a NO_MATCH. +
+
firstNumberIn
- first number to comparesecondNumberIn
- second number to compare
++public PhoneNumberUtil.MatchType isNumberMatch(PhoneNumber firstNumber, + java.lang.String secondNumber)+
+
firstNumber
- first number to compare in proto buffer format.secondNumber
- second number to compare. Can contain formatting, and can have country
+ calling code specified with + at the start.
+
+
+
|
++ + | +|||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Classes
+
+ +AsYouTypeFormatter + +PhoneNumberMatch + +PhoneNumberUtil |
+
+Exceptions
+
+ +NumberParseException |
+
+
+
|
++ + | +|||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Class Summary | +|
---|---|
AsYouTypeFormatter | +A formatter which formats phone numbers as they are entered. | +
PhoneNumberMatch | +The immutable match of a phone number within a piece of text. | +
PhoneNumberUtil | +Utility for international phone numbers. | +
+ +
+Enum Summary | +|
---|---|
NumberParseException.ErrorType | ++ |
PhoneNumberUtil.Leniency | +Leniency when finding potential phone numbers in text + segments. | +
PhoneNumberUtil.MatchType | +Types of phone number matches. | +
PhoneNumberUtil.PhoneNumberFormat | +INTERNATIONAL and NATIONAL formats are consistent with the definition in ITU-T Recommendation + E. | +
PhoneNumberUtil.PhoneNumberType | +Type of phone numbers. | +
PhoneNumberUtil.ValidationResult | +Possible outcomes when testing if a PhoneNumber is possible. | +
+ +
+Exception Summary | +|
---|---|
NumberParseException | +Generic exception class for errors encountered when parsing phone numbers. | +
+
+
+
|
++ + | +|||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+ +++Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:
+
+- Interfaces (italic)
- Classes
- Enums
- Exceptions
- Errors
- Annotation Types
+ ++ ++Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.- Class inheritance diagram
- Direct Subclasses
- All Known Subinterfaces
- All Known Implementing Classes
- Class/interface declaration
- Class/interface description +
+
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary +
+
- Field Detail
- Constructor Detail
- Method Detail
+ ++ ++Each annotation type has its own separate page with the following sections:
+
+- Annotation Type declaration
- Annotation Type description
- Required Element Summary
- Optional Element Summary
- Element Detail
+ +++Each enum has its own separate page with the following sections:
+
+- Enum declaration
- Enum description
- Enum Constant Summary
- Enum Constant Detail
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with+java.lang.Object
. The interfaces do not inherit fromjava.lang.Object
.+
+- When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
- When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
+The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.+
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.+
+
+
+
+
+This help file applies to API documentation generated using the standard doclet.
+
+
+
+
+
|
++ + | +|||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
PhoneNumberMatches
in text
.
+PhoneNumberMatches
in text
.
+carrierCode
.
+AsYouTypeFormatter
for the specific region.
+PhoneNumberUtil
instance to carry out international phone number formatting,
+ parsing, or validation.
+nationalNumber_
field of the
+ PhoneNumber object passed in, so that clients could use it to split a national significant
+ number into geographical area code and subscriber number.
+AsYouTypeFormatter.inputDigitAndRememberPosition(char)
.
+AsYouTypeFormatter.inputDigit(char)
, but remembers the position where nextChar
is inserted, so
+ that it can be retrieved later by using AsYouTypeFormatter.getRememberedPosition()
.
+PhoneNumberUtil.isPossibleNumberWithReason(PhoneNumber)
.
+
+
+
|
++ + | +|||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Package com.google.i18n.phonenumbers | +
---|
+Class com.google.i18n.phonenumbers.NumberParseException extends java.lang.Exception implements Serializable | +
---|
+Serialized Fields | +
---|
+NumberParseException.ErrorType errorType+
+java.lang.String message+
+
+
+
|
++ + | +|||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +