Enum Class TreeErrorCode
- All Implemented Interfaces:
Serializable, Comparable<TreeErrorCode>, Constable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetCode()static TreeErrorCodeReturns the enum constant of this class with the specified name.static TreeErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BUILD_FAILED
-
INVALID_NODE
-
DUPLICATE_ID
-
PARENT_NOT_FOUND
-
TRAVERSAL_ERROR
-
MAX_DEPTH_EXCEEDED
-
STACK_OVERFLOW
-
OPERATION_FAILED
-
NODE_NOT_FOUND
-
INVALID_OPERATION
-
CYCLE_DETECTED
-
VALIDATION_FAILED
-
NULL_ID
-
-
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
-
getCode
-
getMessage
-