1 package edu.jiangxin.apktoobox.swing.treetable;
2
3 import java.util.Collections;
4 import java.util.Date;
5 import java.util.List;
6
7 public class MyDataNode {
8
9 private String name;
10 private String capital;
11 private Date declared;
12 private Integer area;
13
14 private List<MyDataNode> children;
15
16 public MyDataNode(String name, String capital, Date declared, Integer area, List<MyDataNode> children) {
17 this.name = name;
18 this.capital = capital;
19 this.declared = declared;
20 this.area = area;
21 this.children = children;
22
23 if (this.children == null) {
24 this.children = Collections.emptyList();
25 }
26 }
27
28 public String getName() {
29 return name;
30 }
31
32 public String getCapital() {
33 return capital;
34 }
35
36 public Date getDeclared() {
37 return declared;
38 }
39
40 public Integer getArea() {
41 return area;
42 }
43
44 public List<MyDataNode> getChildren() {
45 return children;
46 }
47
48
49
50
51 public String toString() {
52 return name;
53 }
54 }