1 | public class Parent {↵ | | 1 | public class Parent {↵
|
2 | private String name;↵ | | 2 | private String name;↵
|
3 | private Set children = new HashSet();↵ | | 3 | private Set children = new HashSet();↵
|
|
4 | public Parent() {↵ | | 4 | public Parent() {↵
|
5 | }↵ | | 5 | }↵
|
|
6 | public Parent(String name) {↵ | | 6 | public Parent(String name) {↵
|
7 | this.name = name;↵ | | 7 | this.name = name;↵
|
8 | }↵ | | 8 | }↵
|
|
9 | public String getName() {↵ | | 9 | public String getName() {↵
|
10 | return name;↵ | | 10 | return name;↵
|
11 | }↵ | | 11 | }↵
|
|
12 | public void setName(String name) {↵ | | 12 | public void setName(String name) {↵
|
13 | this.name = name;↵ | | 13 | this.name = name;↵
|
14 | }↵ | | 14 | }↵
|
|
15 | public Set getChildren() {↵ | | 15 | public Set getChildren() {↵
|
16 | return children;↵ | | 16 | return children;↵
|
17 | }↵ | | 17 | }↵
|
|
18 | public void setChildren(Set children) {↵ | | 18 | public void setChildren(Set children) {↵
|
19 | this.children = children;↵ | | 19 | this.children = children;↵
|
20 | | | 20 |
|