Enum Class TreeErrorCode

java.lang.Object
java.lang.Enum<TreeErrorCode>
cloud.opencode.base.tree.exception.TreeErrorCode
All Implemented Interfaces:
Serializable, Comparable<TreeErrorCode>, Constable

public enum TreeErrorCode extends Enum<TreeErrorCode>
Tree Error Code 树错误码

Error codes for tree operations.

树操作的错误码。

Features | 主要功能:

  • Categorized error codes (build, traversal, operation, validation) - 分类错误码(构建、遍历、操作、验证)
  • Bilingual error messages - 双语错误消息

Usage Examples | 使用示例:

TreeErrorCode code = TreeErrorCode.CYCLE_DETECTED;
String errorCode = code.getCode();   // "TREE-4001"
String message = code.getMessage();

Security | 安全性:

  • Thread-safe: Yes (enum is immutable) - 是(枚举是不可变的)
  • Null-safe: Yes - 是
Since:
JDK 25, opencode-base-tree V1.0.0
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Enum Constant Details

    • BUILD_FAILED

      public static final TreeErrorCode BUILD_FAILED
    • INVALID_NODE

      public static final TreeErrorCode INVALID_NODE
    • DUPLICATE_ID

      public static final TreeErrorCode DUPLICATE_ID
    • PARENT_NOT_FOUND

      public static final TreeErrorCode PARENT_NOT_FOUND
    • TRAVERSAL_ERROR

      public static final TreeErrorCode TRAVERSAL_ERROR
    • MAX_DEPTH_EXCEEDED

      public static final TreeErrorCode MAX_DEPTH_EXCEEDED
    • STACK_OVERFLOW

      public static final TreeErrorCode STACK_OVERFLOW
    • OPERATION_FAILED

      public static final TreeErrorCode OPERATION_FAILED
    • NODE_NOT_FOUND

      public static final TreeErrorCode NODE_NOT_FOUND
    • INVALID_OPERATION

      public static final TreeErrorCode INVALID_OPERATION
    • CYCLE_DETECTED

      public static final TreeErrorCode CYCLE_DETECTED
    • VALIDATION_FAILED

      public static final TreeErrorCode VALIDATION_FAILED
    • NULL_ID

      public static final TreeErrorCode NULL_ID
  • Method Details

    • values

      public static TreeErrorCode[] 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 TreeErrorCode 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
    • getCode

      public String getCode()
    • getMessage

      public String getMessage()