package com.zving.tree;
import java.util.ArrayList;
import java.util.List;
/**
* 树形结构实体类
* @author clove
*/
public class Node {
private int id;
private int pid;
private String name;
private String type;
private List children = new ArrayList<>();
public Node(int id, int pid) {
this.id = id;
this.pid = pid;
}
public Node(int id, int pid, String name, String type) {
this(id, pid);
this.name = name;
this.type = type;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getPid() {
return pid;
}
public void setPid(int pid) {
this.pid = pid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public List getChildren() {
return children;
}
public void setChildren(List children) {
this.children = children;
}
}