1 | public class Immutable {↵ | | 1 | public class Parent {↵
|
2 | private String foo;↵ | | 2 | private Long id;↵
|
3 | private String bar;↵ | | 3 | private String name;↵
|
4 | private String id;↵ | | 4 | private ↵
|
5 | ↵ | | |
|
6 | public String getFoo() {↵ | | |
|
7 | return foo;↵ | | |
|
8 | }↵ | | |
|
9 | ↵ | | |
|
10 | public void setFoo(String foo) {↵ | | |
|
11 | this.foo = foo;↵ | | |
|
12 | }↵ | | |
|
13 | ↵ | | 5 | Collection children = new HashSet();↵
|
| | | 6 | /**↵
|
| | | 7 | * @return Returns the children.↵
|
| | | 8 | */↵
|
| | | 9 | public Collection getChildren() {↵
|
| | | 10 | return children;↵
|
| | | 11 | }↵
|
| | | 12 | /**↵
|
| | | 13 | * @param children The children to set.↵
|
| | | 14 | */↵
|
| | | 15 | public void setChildren(Collection children) {↵
|
| | | 16 | this.children = children;↵
|
| | | 17 | }↵
|
| | | 18 | /**↵
|
| | | 19 | * @return Returns the id.↵
|
| | | 20 | */↵
|
14 | public String getBar() {↵ | | 21 | public Long getId() {↵
|
15 | return bar;↵ | | 22 | return id;↵
|
16 | }↵ | | 23 | }↵
|
17 | ↵ | | 24 | /**↵
|
| | | 25 | * @param id The id to set.↵
|
| | | 26 | */↵
|
18 | public void setBar(String bar) {↵ | | 27 | public void set↵
|
19 | this.bar = bar;↵ | | |
|
20 | }↵ | | |
|
21 | ↵ | | 28 | Id(Long id) {↵
|
| | | 29 | this.id = id;↵
|
| | | 30 | }↵
|
| | | 31 | /**↵
|
| | | 32 | * @return Returns the name.↵
|
| | | 33 | */↵
|
22 | public String getId() {↵ | | 34 | public String getName() {↵
|
23 | return id;↵ | | 35 | return name;↵
|
24 | }↵ | | 36 | }↵
|
25 | ↵ | | 37 | /**↵
|
| | | 38 | * @param name The name to set.↵
|
| | | 39 | */↵
|
26 | public void setId(String id) {↵ | | 40 | public void setName(String name) {↵
|
27 | this.id = id;↵ | | 41 | this.name = name;↵
|
28 | | | 42 |
|