| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /* loaded from: blade-core-tool-9.3.0.0-SNAPSHOT.jar:org/springblade/core/tool/node/basic/TreeUtil.class */ |
| | | public final class TreeUtil { |
| | | private TreeUtil() { |
| | | throw new UnsupportedOperationException("This is a utility class and cannot be instantiated"); |
| | |
| | | for (T it : treeNodes) { |
| | | if (it.getParentId().equals(treeNode.getId())) { |
| | | if (treeNode.getChildren() == null) { |
| | | treeNode.setChildren(new ArrayList()); |
| | | treeNode.setChildren(new ArrayList<>()); |
| | | } |
| | | treeNode.add(it); |
| | | } |