Enum Class AggregationStrategy
- All Implemented Interfaces:
Serializable, Comparable<AggregationStrategy>, Constable
Aggregation Strategy - Defines How Individual Rule Scores Are Combined
聚合策略 - 定义如何组合各规则的分数
Determines the mathematical operation used to reduce multiple per-rule scores into a single total score.
确定用于将多个规则分数归约为单个总分的数学运算。
- Since:
- JDK 25, opencode-base-rules V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAverage of all scores (0 if none) | 所有分数的平均值(如果没有则为0)Maximum score among all rules | 所有规则中的最高分Sum all individual scores | 所有分数求和Sum of (score * weight) for each rule | 每条规则的 (分数 * 权重) 之和 -
Method Summary
Modifier and TypeMethodDescriptionstatic AggregationStrategyReturns the enum constant of this class with the specified name.static AggregationStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUM
Sum all individual scores | 所有分数求和 -
WEIGHTED_SUM
Sum of (score * weight) for each rule | 每条规则的 (分数 * 权重) 之和 -
MAX
Maximum score among all rules | 所有规则中的最高分 -
AVERAGE
Average of all scores (0 if none) | 所有分数的平均值(如果没有则为0)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-