Enum Class Strategy
- All Implemented Interfaces:
Serializable, Comparable<Strategy>, Constable
Approval / vote strategy that determines how a multi-assignee step
decides "approved" / "rejected".
决定多人节点如何判定"通过 / 驳回"的策略枚举。
Strategy semantics (v4 §4.3 / §4.4):
- Since:
- JDK 25, opencode-base-flow V1.0.5
- Author:
- Leon Soo
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
-
Enum Constant Details
-
SEQUENTIAL
Sequential approval: every assignee must approve in order. 逐级同意:所有 assignees 按顺序依次审批,全部同意才通过。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
ONE_OF_N
Any one of the assignees may approve to pass. 同级一人同意即通过。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
ALL
All voters must vote AGREE. 全票通过。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
ANY
Any single AGREE vote passes. 一票通过。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
MAJORITY
More than 50% AGREE passes. 多数赞同(> 50%)通过。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
VETO
Any single DISAGREE vetoes the step. 一票否决。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
-
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
-