Package com.google.i18n.phonenumbers
Enum Class PhoneNumberUtil.Leniency
- All Implemented Interfaces:
Serializable
,Comparable<PhoneNumberUtil.Leniency>
,Constable
- Enclosing class:
- PhoneNumberUtil
Leniency when finding potential phone numbers in text
segments. The levels here are ordered in increasing strictness.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PhoneNumberUtil.Leniency
Returns the enum constant of this class with the specified name.static PhoneNumberUtil.Leniency[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
POSSIBLE
-
VALID
-
STRICT_GROUPING
Phone numbers accepted are valid and are grouped in a possible way for this locale. For example, a US number written as "65 02 53 00 00" and "650253 0000" are not accepted at this leniency level, whereas "650 253 0000", "650 2530000" or "6502530000" are. Numbers with more than one '/' symbol in the national significant number are also dropped at this level.Warning: This level might result in lower coverage especially for regions outside of country code "+1". If you are not sure about which level to use, email the discussion group [email protected].
-
EXACT_GROUPING
Phone numbers accepted are valid and are grouped in the same way that we would have formatted it, or as a single block. For example, a US number written as "650 2530000" is not accepted at this leniency level, whereas "650 253 0000" or "6502530000" are. Numbers with more than one '/' symbol are also dropped at this level.Warning: This level might result in lower coverage especially for regions outside of country code "+1". If you are not sure about which level to use, email the discussion group [email protected].
-
-
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
-