mirror of
https://github.com/chillzhuang/blade-tool
synced 2024-12-12 12:19:27 +08:00
✨ 代码优化
This commit is contained in:
parent
a9dcbaacec
commit
083b42c2fb
@ -13,7 +13,7 @@ import java.util.List;
|
||||
public class NodeTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
List<INode> list = new ArrayList<>();
|
||||
List<ForestNode> list = new ArrayList<>();
|
||||
list.add(new ForestNode(1, 0, "1"));
|
||||
list.add(new ForestNode(2, 0, "2"));
|
||||
list.add(new ForestNode(3, 1, "3"));
|
||||
@ -24,11 +24,10 @@ public class NodeTest {
|
||||
list.add(new ForestNode(8, 5, "8"));
|
||||
list.add(new ForestNode(9, 6, "9"));
|
||||
list.add(new ForestNode(10, 9, "10"));
|
||||
List<INode> tns = ForestNodeMerger.merge(list);
|
||||
tns.forEach(node -> {
|
||||
ForestNode n = (ForestNode) node;
|
||||
System.out.println(JsonUtil.toJson(n));
|
||||
});
|
||||
List<ForestNode> tns = ForestNodeMerger.merge(list);
|
||||
tns.forEach(node ->
|
||||
System.out.println(JsonUtil.toJson(node))
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user