Add a {@link RuleWrapper} to the list.

@param addRule the {@link Rule} to add.
432327
public void addRule( RuleWrapper addRule ) {
        Rule rule = addRule.getRule();
        featureTypeStyle.rules().add(rule);
        rulesWrapperList.add(addRule);
    }
1094485
public Rule addRule(String name, Node condition) {
		Rule rule = new Rule(name, condition);
		rules.put(name, rule);
		return rule;
	}
703193
public void addArgumentItemRule(ItemRule argumentItemRule) {
        if (argumentItemRuleMap == null) {
            argumentItemRuleMap = new ItemRuleMap();
        }
        argumentItemRuleMap.putItemRule(argumentItemRule);
    }
250784
boolean addPolicy(String sec, String ptype, List<String> rule) {
        boolean ruleAdded = model.addPolicy(sec, ptype, rule);
        if (!ruleAdded) {
            return false;
        }

        if (adapter != null && autoSave) {
            try {
                adapter.addPolicy(sec, ptype, rule);
            } catch (Error e) {
                if (!e.getMessage().equals("not implemented")) {
                    throw e;
                }
            }

            if (watcher != null) {
                // error intentionally ignored
                watcher.update();
            }
        }

        return true;
    }
1136003
public MultipleRuleContext<DPO, RI, RO> check(Rule<RI, RO> rule) {
        if (rule != null) {
            addedRules.add(rule);
        }

        // Change context
        return new MultipleRuleContext<DPO, RI, RO>(addedTriggers, addedDataProviders, dataProviderToRuleMapping,
                addedRuleInputTransformers, addedRules);
    }
917526
public void addRule(final Element element) {
		FxCopRule rule = new FxCopRule(element.getAttribute("TypeName"), element.getAttribute("Category"), element.getAttribute("CheckId"));
		rule.setUrl(getNamedTagText(element, "Url"));
		rule.setDescription(getNamedTagText(element, "Description"));
		rule.setName(getNamedTagText(element, "Name"));

		rules.put(getRuleKey(rule.getCategory(), rule.getCheckId()), rule);
	}
395993
public void addAttributeItemRule(ItemRule attributeItemRule) {
        if (attributeItemRuleMap == null) {
            attributeItemRuleMap = new ItemRuleMap();
        }
        attributeItemRuleMap.putItemRule(attributeItemRule);
    }
197949
public void removeRule( RuleWrapper remRule ) {
        Rule rule = remRule.getRule();
        featureTypeStyle.rules().remove(rule);
        rulesWrapperList.remove(remRule);
    }
758436
public void updateRuleBasicInfo(ValidationRule rule) {
        this.orderIdx = rule.orderIdx;
        this.parentDependency = rule.parentDependency;
        this.standardValueType = rule.standardValueType;
        this.validationCheck = rule.validationCheck;
        this.overlapBanRuleName = rule.overlapBanRuleName;
        this.assistType = rule.assistType;
    }
1267978
public void addBeanRule(final BeanRule beanRule) throws IllegalRuleException {
        PrefixSuffixPattern prefixSuffixPattern = PrefixSuffixPattern.parse(beanRule.getId());
        String scanPattern = beanRule.getScanPattern();
        if (scanPattern != null) {
            BeanClassScanner scanner = createBeanClassScanner(beanRule);
            List<BeanRule> beanRules = new ArrayList<>();
            scanner.scan(scanPattern, (resourceName, targetClass) -> {
                BeanRule beanRule2 = beanRule.replicate();
                if (prefixSuffixPattern != null) {
                    beanRule2.setId(prefixSuffixPattern.join(resourceName));
                } else {
                    if (beanRule.getId() != null) {
                        beanRule2.setId(beanRule.getId() + resourceName);
                    } else if (beanRule.getMaskPattern() != null) {
                        beanRule2.setId(resourceName);
                    }
                }
                beanRule2.setBeanClass(targetClass);
                beanRules.add(beanRule2);
            });
            for (BeanRule beanRule2 : beanRules) {
                dissectBeanRule(beanRule2);
            }
        } else {
            if (!beanRule.isFactoryOffered()) {
                String className = beanRule.getClassName();
                if (prefixSuffixPattern != null) {
                    beanRule.setId(prefixSuffixPattern.join(className));
                }
                Class<?> beanClass;
                try {
                    beanClass = classLoader.loadClass(className);
                } catch (ClassNotFoundException e) {
                    throw new BeanRuleException("Failed to load bean class", beanRule, e);
                }
                beanRule.setBeanClass(beanClass);
            }
            dissectBeanRule(beanRule);
        }
    }
1007658
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPRule addCPRule(CPRule cpRule) {
		cpRule.setNew(true);

		return cpRulePersistence.update(cpRule);
	}
1248497
def add_rule(self, rule_class, target_class=_Nothing):
        
        if isinstance(target_class, Iterable):
            for cls in target_class:
                self._rules[cls] = rule_class
        else:
            self._rules[target_class] = rule_class
744717
public void addParameterItemRule(ItemRule parameterItemRule) {
        if (parameterItemRuleMap == null) {
            parameterItemRuleMap = new ItemRuleMap();
        }
        parameterItemRuleMap.putItemRule(parameterItemRule);
    }
314654
def add_rule(rule)
      if rule.is_a? Axlsx::ConditionalFormattingRule
        @rules << rule
      elsif rule.is_a? Hash
        @rules << ConditionalFormattingRule.new(rule)
      end
    end
975973
private void addRulesFromDocument(Document document) {
        NodeList ruleNodes = document.getElementsByTagName("rule");
        for (int i = 0; i < ruleNodes.getLength(); i++) {
            addRule(extractClassAttributeFromNode(ruleNodes.item(i)), extractPriorityAttributeFromNode(ruleNodes.item(i)));
        }
    }
372199
def add_rule(self, name, callable_):
        """"""
        assert isinstance(name, basestring)
        assert callable(callable_)
        self.project_rules_.add_rule(name, callable_)
61320
public synchronized void register(@NonNull EventHandlerWrapper eventHandler) {
        String type = eventHandler.type;
        List<EventHandlerWrapper> handlers = subscribers.get(eventHandler.type);
        if (handlers == null) {
            handlers = new ArrayList<>();
            subscribers.put(type, handlers);
        }
        handlers.add(eventHandler);
    }