mirror of https://gitee.com/stylefeng/roses
【7.0.2】【tree】树构建的类增加泛型
parent
5871d812c3
commit
21e8b159ee
|
@ -32,7 +32,7 @@ import java.util.List;
|
|||
* @author fengshuonan
|
||||
* @date 2020/10/15 14:31
|
||||
*/
|
||||
public interface AbstractTreeNode {
|
||||
public interface AbstractTreeNode<T> {
|
||||
|
||||
/**
|
||||
* 获取节点id
|
||||
|
@ -59,6 +59,6 @@ public interface AbstractTreeNode {
|
|||
* @author fengshuonan
|
||||
* @date 2020/10/15 15:28
|
||||
*/
|
||||
void setChildrenNodes(List childrenNodes);
|
||||
void setChildrenNodes(List<T> childrenNodes);
|
||||
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ import java.util.List;
|
|||
* @date 2020/10/15 14:39
|
||||
*/
|
||||
@Data
|
||||
public class DefaultTreeNode implements AbstractTreeNode {
|
||||
public class DefaultTreeNode implements AbstractTreeNode<DefaultTreeNode> {
|
||||
|
||||
/**
|
||||
* 节点id
|
||||
|
@ -87,7 +87,7 @@ public class DefaultTreeNode implements AbstractTreeNode {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setChildrenNodes(List childrenNodes) {
|
||||
public void setChildrenNodes(List<DefaultTreeNode> childrenNodes) {
|
||||
this.children = childrenNodes;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ import java.util.List;
|
|||
*/
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
public class ZTreeNode implements AbstractTreeNode {
|
||||
public class ZTreeNode implements AbstractTreeNode<ZTreeNode> {
|
||||
|
||||
/**
|
||||
* 节点id
|
||||
|
@ -88,7 +88,7 @@ public class ZTreeNode implements AbstractTreeNode {
|
|||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
private List children;
|
||||
private List<ZTreeNode> children;
|
||||
|
||||
/**
|
||||
* 创建ztree的父级节点
|
||||
|
@ -118,7 +118,7 @@ public class ZTreeNode implements AbstractTreeNode {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setChildrenNodes(List childrenNodes) {
|
||||
public void setChildrenNodes(List<ZTreeNode> childrenNodes) {
|
||||
this.children = childrenNodes;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ import java.util.List;
|
|||
* @date 2020/10/30 11:05
|
||||
*/
|
||||
@Data
|
||||
public class TreeDictInfo implements AbstractTreeNode {
|
||||
public class TreeDictInfo implements AbstractTreeNode<TreeDictInfo> {
|
||||
|
||||
/**
|
||||
* 字典id
|
||||
|
@ -84,7 +84,7 @@ public class TreeDictInfo implements AbstractTreeNode {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setChildrenNodes(List linkedList) {
|
||||
public void setChildrenNodes(List<TreeDictInfo> linkedList) {
|
||||
this.children = linkedList;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import java.util.List;
|
|||
* @date 2020/4/5 12:03
|
||||
*/
|
||||
@Data
|
||||
public class AntdMenuSelectTreeNode implements AbstractTreeNode {
|
||||
public class AntdMenuSelectTreeNode implements AbstractTreeNode<AntdMenuSelectTreeNode> {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
|
@ -67,7 +67,7 @@ public class AntdMenuSelectTreeNode implements AbstractTreeNode {
|
|||
/**
|
||||
* 子节点
|
||||
*/
|
||||
private List children;
|
||||
private List<AntdMenuSelectTreeNode> children;
|
||||
|
||||
@Override
|
||||
public String getNodeId() {
|
||||
|
@ -80,7 +80,7 @@ public class AntdMenuSelectTreeNode implements AbstractTreeNode {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setChildrenNodes(List childrenNodes) {
|
||||
public void setChildrenNodes(List<AntdMenuSelectTreeNode> childrenNodes) {
|
||||
this.children = childrenNodes;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ import java.util.List;
|
|||
* @date 2021/1/7 18:09
|
||||
*/
|
||||
@Data
|
||||
public class AntdvMenuItem implements AbstractTreeNode {
|
||||
public class AntdvMenuItem implements AbstractTreeNode<AntdvMenuItem> {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
|
@ -89,7 +89,7 @@ public class AntdvMenuItem implements AbstractTreeNode {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setChildrenNodes(List childrenNodes) {
|
||||
public void setChildrenNodes(List<AntdvMenuItem> childrenNodes) {
|
||||
this.children = childrenNodes;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import java.util.List;
|
|||
* @date 2020/12/27 18:36
|
||||
*/
|
||||
@Data
|
||||
public class LayuiIndexMenuTreeNode implements AbstractTreeNode {
|
||||
public class LayuiIndexMenuTreeNode implements AbstractTreeNode<LayuiIndexMenuTreeNode> {
|
||||
|
||||
/**
|
||||
* 应用编码
|
||||
|
@ -84,7 +84,7 @@ public class LayuiIndexMenuTreeNode implements AbstractTreeNode {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setChildrenNodes(List childrenNodes) {
|
||||
public void setChildrenNodes(List<LayuiIndexMenuTreeNode> childrenNodes) {
|
||||
this.children = childrenNodes;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import java.util.List;
|
|||
* @date 2021/1/9 16:59
|
||||
*/
|
||||
@Data
|
||||
public class LayuiMenuAndButtonTreeResponse implements AbstractTreeNode {
|
||||
public class LayuiMenuAndButtonTreeResponse implements AbstractTreeNode<LayuiMenuAndButtonTreeResponse> {
|
||||
|
||||
/**
|
||||
* 节点ID
|
||||
|
@ -71,7 +71,7 @@ public class LayuiMenuAndButtonTreeResponse implements AbstractTreeNode {
|
|||
/**
|
||||
* 子节点集合
|
||||
*/
|
||||
private List children;
|
||||
private List<LayuiMenuAndButtonTreeResponse> children;
|
||||
|
||||
@Override
|
||||
public String getNodeId() {
|
||||
|
@ -84,7 +84,7 @@ public class LayuiMenuAndButtonTreeResponse implements AbstractTreeNode {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setChildrenNodes(List childrenNodes) {
|
||||
public void setChildrenNodes(List<LayuiMenuAndButtonTreeResponse> childrenNodes) {
|
||||
this.children = childrenNodes;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ import java.util.List;
|
|||
* @date 2020/12/27 18:36
|
||||
*/
|
||||
@Data
|
||||
public class OrganizationTreeNode implements AbstractTreeNode, AbstractXmSelectNode {
|
||||
public class OrganizationTreeNode implements AbstractTreeNode<OrganizationTreeNode>, AbstractXmSelectNode {
|
||||
|
||||
/**
|
||||
* 父id,一级节点父id是0
|
||||
|
@ -80,7 +80,7 @@ public class OrganizationTreeNode implements AbstractTreeNode, AbstractXmSelectN
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setChildrenNodes(List childrenNodes) {
|
||||
public void setChildrenNodes(List<OrganizationTreeNode> childrenNodes) {
|
||||
this.children = childrenNodes;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import java.util.List;
|
|||
* @date 2021/1/14 21:51
|
||||
*/
|
||||
@Data
|
||||
public class LayuiApiResourceTreeNode implements AbstractTreeNode {
|
||||
public class LayuiApiResourceTreeNode implements AbstractTreeNode<LayuiApiResourceTreeNode> {
|
||||
|
||||
/**
|
||||
* 资源的上级编码
|
||||
|
@ -82,7 +82,7 @@ public class LayuiApiResourceTreeNode implements AbstractTreeNode {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setChildrenNodes(List childrenNodes) {
|
||||
public void setChildrenNodes(List<LayuiApiResourceTreeNode> childrenNodes) {
|
||||
this.children = childrenNodes;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ import java.util.List;
|
|||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_menu")
|
||||
public class SysMenu extends BaseEntity implements AbstractTreeNode {
|
||||
public class SysMenu extends BaseEntity implements AbstractTreeNode<SysMenu> {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
|
@ -190,7 +190,7 @@ public class SysMenu extends BaseEntity implements AbstractTreeNode {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setChildrenNodes(List childrenNodes) {
|
||||
public void setChildrenNodes(List<SysMenu> childrenNodes) {
|
||||
this.children = childrenNodes;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import java.util.List;
|
|||
* @date 2020/3/26 14:29
|
||||
*/
|
||||
@Data
|
||||
public class ResourceTreeNode implements AbstractTreeNode {
|
||||
public class ResourceTreeNode implements AbstractTreeNode<ResourceTreeNode> {
|
||||
|
||||
/**
|
||||
* 资源id
|
||||
|
@ -69,7 +69,7 @@ public class ResourceTreeNode implements AbstractTreeNode {
|
|||
/**
|
||||
* 子节点集合
|
||||
*/
|
||||
private List children;
|
||||
private List<ResourceTreeNode> children;
|
||||
|
||||
@Override
|
||||
public String getNodeId() {
|
||||
|
@ -82,7 +82,7 @@ public class ResourceTreeNode implements AbstractTreeNode {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setChildrenNodes(List childrenNodes) {
|
||||
public void setChildrenNodes(List<ResourceTreeNode> childrenNodes) {
|
||||
this.children = childrenNodes;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue