Class RegexBasedMatcher
- java.lang.Object
-
- com.google.i18n.phonenumbers.internal.RegexBasedMatcher
-
- All Implemented Interfaces:
MatcherApi
public final class RegexBasedMatcher extends java.lang.Object implements MatcherApi
Implementation of the matcher API using the regular expressions in the PhoneNumberDesc proto message to match numbers.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MatcherApi
create()
boolean
matchNationalNumber(java.lang.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 Detail
-
create
public static MatcherApi create()
-
matchNationalNumber
public boolean matchNationalNumber(java.lang.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
-
-