ConfigurationRuleBuilderCustom addOtherwiseRule(RuleBuilder origin) { RuleBuilder rule = RuleBuilder.define(); /** * .otherwise() clauses should create a Rule that shares state with its origin. */ rule.contextMap = origin.contextMap; rules.add(rule); return new ConfigurationRuleBuilder(this, rule); }
ConfigurationRuleBuilderCustom addOtherwiseRule(RuleBuilder origin) { RuleBuilder rule = RuleBuilder.define(); /** * .otherwise() clauses should create a Rule that shares state with its origin. */ rule.contextMap = origin.contextMap; rules.add(rule); return new ConfigurationRuleBuilder(this, rule); }
/** * Add a new fluent {@link Rule}. */ @Override public ConfigurationRuleBuilderCustom addRule() { RuleBuilder rule = RuleBuilder.define(); setDefaultLocation(rule); rules.add(rule); return new ConfigurationRuleBuilder(this, rule); }
/** * Add a new fluent {@link Rule}. */ @Override public ConfigurationRuleBuilderCustom addRule() { RuleBuilder rule = RuleBuilder.define(); setDefaultLocation(rule); rules.add(rule); return new ConfigurationRuleBuilder(this, rule); }
/** * Add a {@link Rule}. */ @Override public ConfigurationRuleBuilder addRule(Rule rule) { RuleBuilder wrapped = null; if (rule instanceof RuleBuilder) wrapped = (RuleBuilder) rule; else wrapped = RuleBuilder.wrap(rule); rules.add(wrapped); setDefaultLocation(wrapped); return new ConfigurationRuleBuilder(this, wrapped); }
/** * Add a {@link Rule}. */ @Override public ConfigurationRuleBuilder addRule(Rule rule) { RuleBuilder wrapped = null; if (rule instanceof RuleBuilder) wrapped = (RuleBuilder) rule; else wrapped = RuleBuilder.wrap(rule); rules.add(wrapped); setDefaultLocation(wrapped); return new ConfigurationRuleBuilder(this, wrapped); }