Uses of Class
cloud.opencode.base.rules.dsl.RuleBuilder
Packages that use RuleBuilder
Package
Description
OpenCode Base Rules - Lightweight Rule Engine for Java
OpenCode基础规则 - Java轻量级规则引擎
Rule DSL - Fluent API for Rule Construction
规则DSL - 规则构建的流式API
-
Uses of RuleBuilder in cloud.opencode.base.rules
Methods in cloud.opencode.base.rules that return RuleBuilderModifier and TypeMethodDescriptionstatic RuleBuilderOpenRules.rule()Creates a new rule builder 创建新的规则构建器static RuleBuilderCreates a new rule builder with the given name 使用给定名称创建新的规则构建器 -
Uses of RuleBuilder in cloud.opencode.base.rules.dsl
Methods in cloud.opencode.base.rules.dsl that return RuleBuilderModifier and TypeMethodDescriptionAdds an additional AND condition object 添加额外的AND条件对象RuleBuilder.and(Predicate<RuleContext> predicate) Adds an additional AND condition 添加额外的AND条件Adds an additional action object 添加额外的动作对象RuleBuilder.andThen(Consumer<RuleContext> action) Adds an additional action 添加额外的动作RuleBuilder.description(String description) Sets the rule description 设置规则描述RuleBuilder.enabled(boolean enabled) Sets whether the rule is enabled 设置规则是否启用Sets the rule group 设置规则分组RuleBuilder.priority(int priority) Sets the rule priority (lower value = higher priority) 设置规则优先级(值越小优先级越高)static RuleBuilderCreates a rule builder with the given name 使用给定名称创建规则构建器RuleBuilder.terminal()Marks the rule as terminal (stops engine execution when fired) 将规则标记为终止规则(触发时停止引擎执行)RuleBuilder.terminal(boolean terminal) Sets whether the rule is terminal 设置规则是否为终止规则Adds an action object 添加动作对象RuleBuilder.then(Consumer<RuleContext> action) Adds an action using a consumer 使用消费者添加动作Adds a condition object 添加条件对象RuleBuilder.when(Predicate<RuleContext> predicate) Adds a condition using a predicate 使用谓词添加条件