yangys
2024-03-31 2969df3e404db3cd116f27db1495e523ce05bf86
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.qianwen.core.tool.node;
 
import java.util.ArrayList;
import java.util.List;
import com.qianwen.core.tool.jackson.JsonUtil;
 
/* loaded from: blade-core-tool-9.3.0.0-SNAPSHOT.jar:org/springblade/core/tool/node/NodeTest.class */
public class NodeTest {
    public static void main(String[] args) {
        List<ForestNode> list = new ArrayList<>();
        list.add(new ForestNode(1L, 0L, "1"));
        list.add(new ForestNode(2L, 0L, "2"));
        list.add(new ForestNode(3L, 1L, "3"));
        list.add(new ForestNode(4L, 2L, "4"));
        list.add(new ForestNode(5L, 3L, "5"));
        list.add(new ForestNode(6L, 4L, "6"));
        list.add(new ForestNode(7L, 3L, "7"));
        list.add(new ForestNode(8L, 5L, "8"));
        list.add(new ForestNode(9L, 6L, "9"));
        list.add(new ForestNode(10L, 9L, "10"));
        List<ForestNode> tns = ForestNodeMerger.merge(list);
        tns.forEach(node -> {
            System.out.println(JsonUtil.toJson(node));
        });
    }
}