初始化 字典 包

This commit is contained in:
jiangdingxuan
2024-01-08 13:38:00 +08:00
parent 6e51306ced
commit 2ae7c39b9f
9 changed files with 159 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package net.rzdata.demo.trait;
import java.util.List;
public interface TreeNode<T extends TreeNode<T, ID>, ID> {
ID getId();
ID getParentId();
List<T> getChildren();
void setChildren(List<T> children);
default boolean isLeaf() {
return getChildren() == null;
}
}