[#BloombergLP-ball-RuleSet-getRuleById] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/RuleSet.adoc[RuleSet]::getRuleById :relfileprefix: ../../../ :mrdocs: Return the address of the rule having the specified `id` if such a rule exists, and 0 otherwise. The behavior is undefined unless `0 <= id < maxNumRules()`. Note that rules may be assigned non‐sequential identifiers, and that there may be a valid rule whose identifier is greater than `numRules()` (i.e., valid rules may appear anywhere in the range `0 <= id < maxNumRules()`). == Synopsis Declared in `<ball_ruleset.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/Rule.adoc[Rule] const* getRuleById(int id) const; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#