Class RegexBasedMatcher
- java.lang.Object
-
- io.michaelrocks.libphonenumber.android.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 MatcherApicreate()booleanmatchNationalNumber(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 givenPhoneNumberDescmessage.
-
-
-
Method Detail
-
create
public static MatcherApi create()
-
matchNationalNumber
public boolean matchNationalNumber(java.lang.CharSequence number, Phonemetadata.PhoneNumberDesc numberDesc, boolean allowPrefixMatch)Description copied from interface:MatcherApiReturns whether the given national number (a string containing only decimal digits) matches the national number pattern defined in the givenPhoneNumberDescmessage.- Specified by:
matchNationalNumberin interfaceMatcherApi
-
-