dom.pattern.Repeat Extends goog.dom.pattern.AbstractPattern
Pattern object that matches a repetition of another pattern.

Inheritance

Constructor

goog.dom.pattern.Repeat(patternopt_minimumopt_maximum)

Parameters

pattern : goog.dom.pattern.AbstractPattern
The pattern to repetitively match.
opt_minimum : number=
The minimum number of times to match. Defaults to 0.
opt_maximum : number=
The maximum number of times to match. Defaults to unlimited.

Instance Methods

Public Protected Private
matchToken(tokentype) goog.dom.pattern.MatchType
Test whether the given token continues a repeated series of matches of the pattern given in the constructor.
Arguments:
token : Node
Token to match against.
type : goog.dom.TagWalkType
The type of token.
Returns: goog.dom.pattern.MatchType  MATCH if the pattern matches, BACKTRACK_MATCH if the pattern does not match but already had accumulated matches, MATCHING if the pattern starts a match, and NO_MATCH if the pattern does not match.
code »
reset()
Reset any internal state this pattern keeps.
code »
matchToken(tokentype) goog.dom.pattern.MatchType
Test whether this pattern matches the given token.
Arguments:
token : Node
Token to match against.
type : goog.dom.TagWalkType
The type of token.
Returns: goog.dom.pattern.MatchType  MATCH if the pattern matches.
code »
reset()
Reset any internal state this pattern keeps.
code »

Instance Properties

constructor :
No description.
Code »
count :
Number of times the pattern has matched.
Code »
matches :
The matched nodes.
Code »
maximum_ :
Optional maximum number of times to match the pattern. A null value will be treated as infinity.
Code »
minimum_ :
No description.
Code »
needsReset_ :
Whether the pattern has recently matched or failed to match and will need to be reset when starting a new round of matches.
Code »
Pattern to repetitively match.
Code »
matchedNode :
The first node matched by this pattern.
Code »

Static Properties

goog.dom.pattern.Repeat.superClass_ :
No description.
Code »

Package dom.pattern

Package Reference