Enum Class DiffType

java.lang.Object
java.lang.Enum<DiffType>
cloud.opencode.base.xml.diff.DiffType
All Implemented Interfaces:
Serializable, Comparable<DiffType>, Constable

public enum DiffType extends Enum<DiffType>
Diff Type - Types of differences between XML documents 差异类型 - XML 文档之间的差异类型

This enum represents the different types of changes that can be detected when comparing two XML documents.

此枚举表示比较两个 XML 文档时可以检测到的不同变更类型。

Features | 主要功能:

  • Element-level changes (added, removed, modified) - 元素级变更(新增、删除、修改)
  • Attribute-level changes (added, removed, modified) - 属性级变更(新增、删除、修改)
  • Text content changes - 文本内容变更
Since:
JDK 25, opencode-base-xml V1.0.3
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Enum Constant Details

    • ADDED

      public static final DiffType ADDED
      Element added in the second document. 第二个文档中新增了元素。
    • REMOVED

      public static final DiffType REMOVED
      Element removed from the first document. 第一个文档中删除了元素。
    • MODIFIED

      public static final DiffType MODIFIED
      Element modified between documents (structural change). 文档之间的元素已修改(结构变更)。
    • ATTRIBUTE_ADDED

      public static final DiffType ATTRIBUTE_ADDED
      Attribute added in the second document. 第二个文档中新增了属性。
    • ATTRIBUTE_REMOVED

      public static final DiffType ATTRIBUTE_REMOVED
      Attribute removed from the first document. 第一个文档中删除了属性。
    • ATTRIBUTE_MODIFIED

      public static final DiffType ATTRIBUTE_MODIFIED
      Attribute value modified between documents. 文档之间的属性值已修改。
    • TEXT_MODIFIED

      public static final DiffType TEXT_MODIFIED
      Text content modified between documents. 文档之间的文本内容已修改。
  • Method Details

    • values

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