Package com.google.i18n.phonenumbers
Enum Class PhoneNumberUtil.ValidationResult
java.lang.Object
java.lang.Enum<PhoneNumberUtil.ValidationResult>
com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult
- All Implemented Interfaces:
Serializable
,Comparable<PhoneNumberUtil.ValidationResult>
,java.lang.constant.Constable
- Enclosing class:
- PhoneNumberUtil
Possible outcomes when testing if a PhoneNumber is possible.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe number has an invalid country calling code.The number is longer than the shortest valid numbers for this region, shorter than the longest valid numbers for this region, and does not itself have a number length that matches valid numbers for this region.The number length matches that of valid numbers for this region.The number length matches that of local numbers for this region only (i.e.The number is longer than all valid numbers for this region.The number is shorter than all valid numbers for this region. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static PhoneNumberUtil.ValidationResult[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IS_POSSIBLE
The number length matches that of valid numbers for this region. -
IS_POSSIBLE_LOCAL_ONLY
The number length matches that of local numbers for this region only (i.e. numbers that may be able to be dialled within an area, but do not have all the information to be dialled from anywhere inside or outside the country). -
INVALID_COUNTRY_CODE
The number has an invalid country calling code. -
TOO_SHORT
The number is shorter than all valid numbers for this region. -
INVALID_LENGTH
The number is longer than the shortest valid numbers for this region, shorter than the longest valid numbers for this region, and does not itself have a number length that matches valid numbers for this region. This can also be returned in the case where isPossibleNumberForTypeWithReason was called, and there are no numbers of this type at all for this region. -
TOO_LONG
The number is longer than all valid numbers for this region.
-
-
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
-