Enum Class AggregationStrategy

java.lang.Object
java.lang.Enum<AggregationStrategy>
cloud.opencode.base.rules.score.AggregationStrategy
All Implemented Interfaces:
Serializable, Comparable<AggregationStrategy>, Constable

public enum AggregationStrategy extends Enum<AggregationStrategy>
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:
  • Enum Constant Details

    • SUM

      public static final AggregationStrategy SUM
      Sum all individual scores | 所有分数求和
    • WEIGHTED_SUM

      public static final AggregationStrategy WEIGHTED_SUM
      Sum of (score * weight) for each rule | 每条规则的 (分数 * 权重) 之和
    • MAX

      public static final AggregationStrategy MAX
      Maximum score among all rules | 所有规则中的最高分
    • AVERAGE

      public static final AggregationStrategy AVERAGE
      Average of all scores (0 if none) | 所有分数的平均值(如果没有则为0)
  • Method Details

    • values

      public static AggregationStrategy[] 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

      public static AggregationStrategy valueOf(String name)
      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 name
      NullPointerException - if the argument is null