【7.0.2】【tree】树构建的类增加泛型

pull/12/head^2
fengshuonan 2021-03-23 22:23:41 +08:00
parent 5871d812c3
commit 21e8b159ee
12 changed files with 28 additions and 28 deletions

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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 {
/**
* idid0
@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}
}