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