Enum Class MergeStrategy
- All Implemented Interfaces:
Serializable, Comparable<MergeStrategy>, Constable
Merge Strategy - Strategies for merging XML documents
合并策略 - XML 文档的合并策略
Defines how conflicts are resolved when merging an overlay document onto a base document.
定义将覆盖文档合并到基础文档时如何解决冲突。
Features | 主要功能:
- OVERRIDE - overlay values replace base values - 覆盖值替换基础值
- APPEND - overlay elements are appended - 覆盖元素追加到末尾
- SKIP_EXISTING - only add elements not in base - 仅添加基础文档中不存在的元素
- Since:
- JDK 25, opencode-base-xml 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 ConstantDescriptionOverlay elements are appended to the base document.Overlay values replace base values for matching elements.Only add elements from overlay that do not exist in base. -
Method Summary
Modifier and TypeMethodDescriptionstatic MergeStrategyReturns the enum constant of this class with the specified name.static MergeStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OVERRIDE
Overlay values replace base values for matching elements. 覆盖值替换匹配元素的基础值。 -
APPEND
Overlay elements are appended to the base document. 覆盖元素追加到基础文档。 -
SKIP_EXISTING
Only add elements from overlay that do not exist in base. 仅从覆盖文档中添加基础文档中不存在的元素。
-
-
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
-