public abstract class QuantifiableTerm extends Term
QuantifiableTerm) can be either a CharacterClass, a
BackReference or a Group). Quantifiers (Token.Quantifier) are attached
directly to the quantified term.| Modifier and Type | Method and Description |
|---|---|
abstract QuantifiableTerm |
copy(RegexAST ast,
boolean recursive)
Copy this node, in one of the following ways:
if
recursive is true, recursively copy this subtree. |
boolean |
equalsSemantic(RegexASTNode obj) |
abstract boolean |
equalsSemantic(RegexASTNode obj,
boolean ignoreQuantifier) |
Token.Quantifier |
getQuantifier() |
RegexASTSubtreeRootNode |
getSubTreeParent()
Returns the subtree root node that this node is a part of.
|
boolean |
hasNotUnrolledQuantifier()
Returns
true iff this term has a quantifier that was not unrolled by the parser. |
boolean |
hasQuantifier() |
abstract boolean |
isUnrollingCandidate()
Returns
true iff the parser should try to unroll this term's quantifier. |
protected String |
quantifierToString() |
void |
setQuantifier(Token.Quantifier quantifier) |
getSeqIndex, setSeqIndexasBackReference, asCharacterClass, asGroup, asLookAheadAssertion, asLookAroundAssertion, asLookBehindAssertion, asMatchFound, asPositionAssertion, asQuantifiableTerm, asSequence, astNodeId, endsWithDollar, getFlags, getId, getMaxPath, getMinPath, getParent, hasBackReferences, hasCaptureGroups, hasCaret, hasDollar, hasEmptyGuard, hasLookAheads, hasLookBehinds, hasLoops, hasQuantifiers, idInitialized, incMaxPath, incMaxPath, incMinPath, incMinPath, isBackReference, isCaret, isCharacterClass, isDead, isDollar, isExpandedQuantifier, isFlagSet, isGroup, isInLookAheadAssertion, isInLookBehindAssertion, isLookAheadAssertion, isLookAroundAssertion, isLookBehindAssertion, isMatchFound, isPositionAssertion, isPrefix, isQuantifiableTerm, isRoot, isSequence, isSubtreeRoot, markAsDead, setDead, setEmptyGuard, setEndsWithDollar, setEndsWithDollar, setExpandedQuantifier, setFlag, setFlag, setFlags, setHasBackReferences, setHasCaptureGroups, setHasCaret, setHasCaret, setHasDollar, setHasDollar, setHasLookAheads, setHasLookBehinds, setHasLoops, setHasLoops, setHasQuantifiers, setId, setMaxPath, setMinPath, setParent, setPrefix, setStartsWithCaret, setStartsWithCaret, startsWithCaret, toJson, toStringWithIDclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIdtoJsonpublic abstract QuantifiableTerm copy(RegexAST ast, boolean recursive)
RegexASTNoderecursive is true, recursively copy this subtree. This method should
be used instead of CopyVisitor if the copying process is required to be thread-safe.
public boolean hasQuantifier()
public boolean hasNotUnrolledQuantifier()
true iff this term has a quantifier that was not unrolled by the parser.public abstract boolean isUnrollingCandidate()
true iff the parser should try to unroll this term's quantifier.public Token.Quantifier getQuantifier()
public void setQuantifier(Token.Quantifier quantifier)
public boolean equalsSemantic(RegexASTNode obj)
equalsSemantic in class RegexASTNodepublic abstract boolean equalsSemantic(RegexASTNode obj, boolean ignoreQuantifier)
protected String quantifierToString()
public RegexASTSubtreeRootNode getSubTreeParent()
RegexASTNodeRegexAST.getNFAAnchoredInitialState(int) and
RegexAST.getNFAUnAnchoredInitialState(int) technically don't belong to the AST, so
they will return null.getSubTreeParent in class Term