Class 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 given PhoneNumberDesc message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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 given PhoneNumberDesc message.
        Specified by:
        matchNationalNumber in interface MatcherApi