Package com.google.i18n.phonenumbers
Enum Class NumberParseException.ErrorType
java.lang.Object
java.lang.Enum<NumberParseException.ErrorType>
com.google.i18n.phonenumbers.NumberParseException.ErrorType
- All Implemented Interfaces:
Serializable
,Comparable<NumberParseException.ErrorType>
,java.lang.constant.Constable
- Enclosing class:
- NumberParseException
The reason that a string could not be interpreted as a phone number.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe country code supplied did not belong to a supported country or non-geographical entity.This indicates the string passed is not a valid number.This indicates the string had more digits than any valid phone number could have.This indicates the string started with an international dialing prefix, but after this was stripped from the number, had less digits than any valid phone number (including country code) could have.This indicates the string, after any country code has been stripped, had less digits than any valid phone number could have. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static NumberParseException.ErrorType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INVALID_COUNTRY_CODE
The country code supplied did not belong to a supported country or non-geographical entity. -
NOT_A_NUMBER
This indicates the string passed is not a valid number. Either the string had less than 3 digits in it or had an invalid phone-context parameter. More specifically, the number failed to match the regular expression VALID_PHONE_NUMBER, RFC3966_GLOBAL_NUMBER_DIGITS, or RFC3966_DOMAINNAME in PhoneNumberUtil.java. -
TOO_SHORT_AFTER_IDD
This indicates the string started with an international dialing prefix, but after this was stripped from the number, had less digits than any valid phone number (including country code) could have. -
TOO_SHORT_NSN
This indicates the string, after any country code has been stripped, had less digits than any valid phone number could have. -
TOO_LONG
This indicates the string had more digits than any valid phone number could have.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-