Class RegexBasedMatcher
java.lang.Object
com.google.i18n.phonenumbers.internal.RegexBasedMatcher
- All Implemented Interfaces:
MatcherApi
Implementation of the matcher API using the regular expressions in the PhoneNumberDesc
proto message to match numbers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MatcherApi
create()
boolean
matchNationalNumber
(CharSequence number, Phonemetadata.PhoneNumberDesc numberDesc, boolean allowPrefixMatch) Returns whether the given national number (a string containing only decimal digits) matches the national number pattern defined in the givenPhoneNumberDesc
message.
-
Method Details
-
create
-
matchNationalNumber
public boolean matchNationalNumber(CharSequence number, Phonemetadata.PhoneNumberDesc numberDesc, boolean allowPrefixMatch) Description copied from interface:MatcherApi
Returns whether the given national number (a string containing only decimal digits) matches the national number pattern defined in the givenPhoneNumberDesc
message.- Specified by:
matchNationalNumber
in interfaceMatcherApi
-