Class StarRE


public class StarRE extends RegExp
Kleene Star RE (r*)
  • Method Details

    • star

      public static RegExp star(RegExp r)
      A canonical regular expression equivalent to r*
    • oneOrMore

      public static RegExp oneOrMore(RegExp r)
      A canonical regular expression equivalent to r+ (Unix notation for 1 or more consecutive matches)
    • hasCaptures

      public boolean hasCaptures()
      Description copied from class: RegExp
      Whether this RE contains any capture, started or not.
      Overrides:
      hasCaptures in class RegExp
    • appendString

      public void appendString(StringBuilder b, int precedence)
      Description copied from class: RegExp
      Append a string representation of the regular expression to the builder b. The precedence of the surrounding context is provided so that necessary parentheses can be added. Precedences: 0 = top level 1 = | 2 = concat 3 = star
      Specified by:
      appendString in class RegExp
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object