我有一个链表,它添加了一个像树一样的对象,下面是打印输出的 LinkedList nodeList = new LinkedList();
(结果 A)
1 : Tester Meeting
2 : Adminstrative & Operational
3 : Functional Committees
4 : Aduit Committee
9 : Supporting Services Development
8 : Medical Services Development
7 : Information Technology Services
6 : Human Resources Committee
15 : test2-2
14 : test2
13 : test1-1
12 : test1
5 : Finance Committee
10 : Regional Advisory Committees
11 : Board Workshop
(结果B)以下应该是正确的顺序
Tester Meeting
Adminstrative & Operational
Functional Committees
Aduit Committee
Finance Committee
test1
test1-1
test2
test2-2
Human Resources Committee
Information Technology Services
Medical Services Development
Supporting Services Development
Regional Advisory Committees
Board Workshop
所以,我想颠倒(ResultA)的审计委员会子节点的顺序输出与ResultB相同的结果,有没有什么方法可以对链表的特定节点进行排序?