From 155d0626fdda49959015683c9e9ad7e711e661f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=81=B0=E5=A4=AA=E7=8B=BC?= <1214761728@qq.com> Date: Wed, 27 Oct 2021 14:42:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9D=9E=E7=99=BB=E9=99=86?= =?UTF-8?q?=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cetc32/dh/common/utils/TreeNode.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/cetc32/dh/common/utils/TreeNode.java b/src/main/java/com/cetc32/dh/common/utils/TreeNode.java index 17d7163..75b38a1 100644 --- a/src/main/java/com/cetc32/dh/common/utils/TreeNode.java +++ b/src/main/java/com/cetc32/dh/common/utils/TreeNode.java @@ -15,7 +15,7 @@ public class TreeNode { String value; String title; String pKey; - List leaf; + List children; public TreeNode(){} public TreeNode(String key,String value){ @@ -27,12 +27,12 @@ public class TreeNode { public TreeNode(String key,String value,String title,String pKey){ this(key,value,title,pKey,null); } - public TreeNode(String key,String value,String title,String pKey,List leaf){ + public TreeNode(String key,String value,String title,String pKey,List children){ this.key =key; this.value=value; this.title =title; this.pKey=pKey; - this.leaf =leaf; + this.children = children; } @@ -68,17 +68,17 @@ public class TreeNode { this.pKey = pKey; } - public List getLeaf() { - return leaf; + public List getChildren() { + return children; } - public void setLeaf(List leaf) { - this.leaf = leaf; + public void setChildren(List children) { + this.children = children; } public void addLeaf(TreeNode leaf){ - if(this.leaf==null) - this.leaf = new ArrayList<>(); - this.leaf.add(leaf); + if(this.children ==null) + this.children = new ArrayList<>(); + this.children.add(leaf); } } -- Gitee