Class Pattern


  • public class Pattern
    extends java.lang.Object
    A class analogous to java.util.regex.Pattern but for SymbolLists.
    Since:
    1.4
    Author:
    David Huen
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FiniteAlphabet getAlphabet()  
      java.lang.String getName()
      return the String label associated with this pattern.
      Matcher matcher​(SymbolList sl)
      Creates a matcher that will match the given input against this pattern.
      java.lang.String patternAsString()
      returns the Pattern to be matched as a String.
      java.lang.String patternExpanded()
      returns the actual String used to construct the regex with all ambiguities expanded.
      • Methods inherited from class java.lang.Object

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

      • getName

        public java.lang.String getName()
        return the String label associated with this pattern.
      • matcher

        public Matcher matcher​(SymbolList sl)
        Creates a matcher that will match the given input against this pattern.
        Parameters:
        sl - SymbolList against which match is to be made.
        Returns:
        A new matcher for this pattern.
      • patternAsString

        public java.lang.String patternAsString()
        returns the Pattern to be matched as a String.
      • patternExpanded

        public java.lang.String patternExpanded()
        returns the actual String used to construct the regex with all ambiguities expanded. //FIXME: do something about unicode strings and conversion back to something sensible.