1 | public class Immutable {↵ | | 1 | public class Employee extends Person {↵
|
2 | private String foo;↵ | | 2 | private String title;↵
|
3 | private String bar;↵ | | 3 | private BigDecimal salary;↵
|
4 | private String id;↵ | | 4 | private ↵
|
5 | ↵ | | 5 | Employee manager;↵
|
| | | 6 | /**↵
|
| | | 7 | * @return Returns the title.↵
|
| | | 8 | */↵
|
6 | public String getFoo() {↵ | | 9 | public String getTitle() {↵
|
7 | return foo;↵ | | 10 | return title;↵
|
8 | }↵ | | 11 | }↵
|
9 | ↵ | | 12 | /**↵
|
| | | 13 | * @param title The title to set.↵
|
| | | 14 | */↵
|
10 | public void setFoo(String foo) {↵ | | 15 | public void setTitle(String title) {↵
|
11 | this.foo = foo;↵ | | 16 | this.↵
|
12 | }↵ | | |
|
13 | ↵ | | 17 | title = title;↵
|
| | | 18 | }↵
|
| | | 19 | /**↵
|
| | | 20 | * @return Returns the manager.↵
|
| | | 21 | */↵
|
14 | public String getBar() {↵ | | 22 | public Employee getManager() {↵
|
15 | return bar;↵ | | 23 | return manager;↵
|
16 | }↵ | | 24 | }↵
|
17 | ↵ | | 25 | ↵
|
18 | public void setBar(String ba↵ | | 26 | /**↵
|
| | | 27 | * @param manager The manager to set.↵
|
| | | 28 | */↵
|
19 | r) {↵ | | 29 | public void setManager(Employee manager) {↵
|
20 | this.bar = bar;↵ | | 30 | this.↵
|
21 | }↵ | | |
|
22 | ↵ | | |
|
23 | public String getId() {↵ | | |
|
24 | return id;↵ | | |
|
25 | }↵ | | |
|
26 | ↵ | | |
|
27 | public void setId(String id) {↵ | | |
|
28 | this.id = id | | 31 | manager = manager;↵
|
| | | 32 | }↵
|
| | | 33 | /**↵
|
| | | 34 | * @return Returns the salary.↵
|
| | | 35 | */↵
|
| | | 36 | public BigDecimal getSalary() {↵
|
| | | 37 | return salary;↵
|
| | | 38 | }↵
|
| | | 39 | /**↵
|
| | | 40 | * @param salary The salary to set.↵
|
| | | 41 | */↵
|
| | | 42 | public void setSalary(BigDecimal salary) {↵
|
| | | 43 | this.salary = salary
|