Rule
Rule declares an identifier, description, variables, and match statements.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Rule(
sourceIdValue):Rule
constructor associates the rule with its source identifier.
Parameters
Section titled “Parameters”sourceIdValue
Section titled “sourceIdValue”number
Returns
Section titled “Returns”Rule
Methods
Section titled “Methods”addMatch()
Section titled “addMatch()”addMatch(
value):void
addMatch adds a match to the rule.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
addVariable()
Section titled “addVariable()”addVariable(
value):void
addVariable adds a variable to the rule.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
addVariables()
Section titled “addVariables()”addVariables(
values):void
addVariables adds variables to the rule in order.
Parameters
Section titled “Parameters”values
Section titled “values”Variable[]
Returns
Section titled “Returns”void
description()
Section titled “description()”description():
ValueString
description returns the rule description when set.
Returns
Section titled “Returns”explanationOutputRule()
Section titled “explanationOutputRule()”explanationOutputRule():
Rule
explanationOutputRule copies this rule using explanation expressions as outputs.
Returns
Section titled “Returns”Rule
id():
ValueString
id returns the rule identifier when set.
Returns
Section titled “Returns”matches()
Section titled “matches()”matches():
Match[]
matches returns the ordered match declarations.
Returns
Section titled “Returns”Match[]
semantic()
Section titled “semantic()”semantic():
RuleSemantic
semantic returns how the rule combines the outcomes of its choices.
Returns
Section titled “Returns”RuleSemantic
setDescription()
Section titled “setDescription()”setDescription(
value):void
setDescription configures the rule description.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
setId()
Section titled “setId()”setId(
value):void
setId configures the rule identifier.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
setSemantic()
Section titled “setSemantic()”setSemantic(
value):void
setSemantic configures how the rule combines the outcomes of its choices.
Parameters
Section titled “Parameters”RuleSemantic
Returns
Section titled “Returns”void
sourceId()
Section titled “sourceId()”sourceId():
number
sourceId returns the source identifier associated with the rule.
Returns
Section titled “Returns”number
variables()
Section titled “variables()”variables():
Variable[]
variables returns the ordered variable declarations.
Returns
Section titled “Returns”Variable[]