Class AlwaysOffStrategy
java.lang.Object
cloud.opencode.base.feature.strategy.AlwaysOffStrategy
- All Implemented Interfaces:
EnableStrategy
Always Off Strategy
始终禁用策略
Strategy that always returns false (feature disabled).
始终返回false(功能禁用)的策略。
Usage Examples | 使用示例:
Feature feature = Feature.builder("always-off")
.strategy(AlwaysOffStrategy.INSTANCE)
.build();
// or using builder shortcut
Feature feature = Feature.builder("always-off")
.alwaysOff()
.build();
Features | 主要功能:
- Unconditionally disables features - 无条件禁用功能
- Zero-overhead evaluation - 零开销评估
Security | 安全性:
- Thread-safe: Yes - 线程安全: 是
- Null-safe: No - 空值安全: 否
- Since:
- JDK 25, opencode-base-feature V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEnabled(Feature feature, FeatureContext context) Always returns false 始终返回falsetoString()
-
Field Details
-
INSTANCE
Singleton instance 单例实例
-
-
Method Details
-
isEnabled
Always returns false 始终返回false- Specified by:
isEnabledin interfaceEnableStrategy- Parameters:
feature- the feature | 功能context- the context | 上下文- Returns:
- always false | 始终为false
-
toString
-