List<Node> results 这个有什么用?
public List<Node> build(){
buildTree(root);
}
private void buildTree(Node parent){
Node node=null;
Iterator<Node> it=nodes.iterator();
while (it.hasNext()){
node=it.next();
if(Objects.equals(node.getParentId(),parent.getId())){
parent.getChildren().add(node);
}
buildTree(node);
}
}