Files
senmesh-zc/src/main/java/com/newyetai/common/util/TreeNode.java

38 lines
496 B
Java
Raw Normal View History

2025-06-11 09:42:13 +08:00
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);
}