This commit is contained in:
ran.shang
2025-06-11 09:42:13 +08:00
commit 7e38b8d971
1935 changed files with 132836 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
package com.newyetai.common.util;
import java.io.Serializable;
/**
* 树型结构
*
* @param <I>
* @author sr on 2019-12-11
*/
public interface TreeNode<I extends Serializable, T extends TreeNode> {
/**
* id
*
* @return
* @author sr on 2019-12-11
*/
I getId();
/**
* 父id
*
* @return
* @author sr on 2019-12-11
*/
I getParentId();
/**
* 添加子节点
*
* @param node
* @author sr on 2019-12-11
*/
void addChildren(T node);
}