Class RegexMatcher

java.lang.Object
ca.phon.phonex.RegexMatcher
All Implemented Interfaces:
PhoneMatcher

public class RegexMatcher extends Object implements PhoneMatcher
Match phone string against a regular expression.
  • Constructor Details

    • RegexMatcher

      public RegexMatcher(String regex)
      Create a new matcher for the given regular expression.
      Parameters:
      regex -
  • Method Details

    • matches

      public boolean matches(IPAElement p)
      Description copied from interface: PhoneMatcher
      Perform test on given phone.
      Specified by:
      matches in interface PhoneMatcher
    • matchesAnything

      public boolean matchesAnything()
      Description copied from interface: PhoneMatcher
      Does this matcher match anything? Used at runtime to help determine proper backtracking paths.
      Specified by:
      matchesAnything in interface PhoneMatcher
    • toString

      public String toString()
      Overrides:
      toString in class Object