Enum Class ConfigChangeType
- All Implemented Interfaces:
Serializable, Comparable<ConfigChangeType>, Constable
Configuration Change Type Enumeration
配置变更类型枚举
Defines the types of configuration changes that can occur during runtime.
Used in conjunction with ConfigChangeEvent to track configuration modifications.
定义运行时可能发生的配置变更类型。与ConfigChangeEvent结合使用以跟踪配置修改。
Features | 主要功能:
- ADDED - New configuration key added - 新增配置键
- MODIFIED - Existing configuration value changed - 现有配置值修改
- REMOVED - Configuration key deleted - 配置键删除
Usage Examples | 使用示例:
// Check change type
ConfigChangeEvent event = ...;
if (event.changeType() == ConfigChangeType.ADDED) {
// Handle new configuration
}
// Use convenience methods in ConfigChangeEvent
if (event.isModified()) {
String oldValue = event.oldValue();
String newValue = event.newValue();
// Handle modification
}
Security | 安全性:
- Thread-safe: Yes (enum) - 线程安全: 是(枚举)
- Immutable: Yes - 不可变: 是
- Since:
- JDK 25, opencode-base-config V1.0.0
- 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 Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigChangeTypeReturns the enum constant of this class with the specified name.static ConfigChangeType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ADDED
New configuration key added 新增配置键 -
MODIFIED
Existing configuration value changed 现有配置值修改 -
REMOVED
Configuration key removed 配置键删除
-
-
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
-