1 | public class BagOwner {↵ | | 1 | public class ListOwner {↵
|
2 | private String name;↵ | | 2 | private String name;↵
|
3 | private BagOwner parent;↵ | | 3 | private ListOwner parent;↵
|
4 | private List children = new ArrayList();↵ | | 4 | private List children = new ArrayList();↵
|
|
5 | public BagOwner() {↵ | | 5 | public ListOwner() {↵
|
6 | }↵ | | 6 | }↵
|
|
7 | public BagOwner(String name) {↵ | | 7 | public ListOwner(String name) {↵
|
8 | this.name = name;↵ | | 8 | this.name = name;↵
|
9 | }↵ | | 9 | }↵
|
|
10 | public String getName() {↵ | | 10 | public String getName() {↵
|
11 | return name;↵ | | 11 | return name;↵
|
12 | }↵ | | 12 | }↵
|
|
13 | public void setName(String name) {↵ | | 13 | public void setName(String name) {↵
|
14 | this.name = name;↵ | | 14 | this.name = name;↵
|
15 | }↵ | | 15 | }↵
|
|
16 | public BagOwner getParent() {↵ | | 16 | public ListOwner getParent() {↵
|
17 | return parent;↵ | | 17 | return parent;↵
|
18 | }↵ | | 18 | }↵
|
|
19 | public void setParent(BagOwner parent) {↵ | | 19 | public void setParent(ListOwner parent) {↵
|
20 | this.parent = parent;↵ | | 20 | this.parent = parent;↵
|
21 | }↵ | | 21 | }↵
|
|
22 | public List getChildren() {↵ | | 22 | public List getChildren() {↵
|
23 | return children;↵ | | 23 | return children;↵
|
24 | }↵ | | 24 | }↵
|
|
25 | public void setChildren(List children) {↵ | | 25 | public void setChildren(List children) {↵
|
26 | this.children = children | | 26 | this.children = children
|