Record Class RuleExplanation
java.lang.Object
java.lang.Record
cloud.opencode.base.rules.explain.RuleExplanation
- Record Components:
ruleName- the rule name | 规则名称fired- whether the rule fired | 规则是否触发reason- human-readable explanation of why it fired or didn't fire | 触发或未触发的人类可读原因
Rule Explanation - Human-Readable Explanation of a Single Rule's Outcome
规则解释 - 单个规则结果的人类可读解释
Captures whether a rule fired and provides a human-readable reason.
捕获规则是否触发并提供人类可读的原因。
- Since:
- JDK 25, opencode-base-rules V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRuleExplanation(String ruleName, boolean fired, String reason) Canonical constructor with validation 带验证的规范构造函数 -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanfired()Returns the value of thefiredrecord component.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.ruleName()Returns the value of theruleNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RuleExplanation
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
ruleName
-
fired
-
reason
-