java.util.regex
Class Pattern.Loop

java.lang.Object
  extended byjava.util.regex.Pattern.Node
      extended byjava.util.regex.Pattern.Loop
Direct Known Subclasses:
Pattern.LazyLoop
Enclosing class:
Pattern

static class Pattern.Loop
extends Pattern.Node

Handles the repetition count for a greedy Curly. The matchInit is called from the Prolog to save the index of where the group beginning is stored. A zero length group check occurs in the normal match but is skipped in the matchInit.


Field Summary
(package private)  int beginIndex
           
(package private)  Pattern.Node body
           
(package private)  int cmax
           
(package private)  int cmin
           
(package private)  int countIndex
           
(package private)  Pattern.Node next
           
 
Constructor Summary
(package private) Pattern.Loop(int countIndex, int beginIndex)
           
 
Method Summary
(package private)  Pattern.Node dup(boolean not)
           
(package private)  boolean match(Matcher matcher, int i, CharSequence seq)
          This method implements the classic accept node.
(package private)  boolean matchInit(Matcher matcher, int i, CharSequence seq)
           
(package private)  boolean study(Pattern.TreeInfo info)
          This method is good for all zero length assertions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

body

Pattern.Node body

countIndex

int countIndex

beginIndex

int beginIndex

cmin

int cmin

cmax

int cmax

next

Pattern.Node next
Constructor Detail

Pattern.Loop

Pattern.Loop(int countIndex,
             int beginIndex)
Method Detail

match

boolean match(Matcher matcher,
              int i,
              CharSequence seq)
Description copied from class: Pattern.Node
This method implements the classic accept node.

Overrides:
match in class Pattern.Node

matchInit

boolean matchInit(Matcher matcher,
                  int i,
                  CharSequence seq)

study

boolean study(Pattern.TreeInfo info)
Description copied from class: Pattern.Node
This method is good for all zero length assertions.

Overrides:
study in class Pattern.Node

dup

Pattern.Node dup(boolean not)