1 | public class Employee extends Person {↵ | | 1 | public class A {↵
|
2 | private String title;↵ | | 2 | private ↵
|
3 | private BigDecimal salary;↵ | | |
|
4 | private Employee manager;↵ | | 3 | Long id;↵
|
| | | 4 | private String name;↵
|
| | | 5 | private E forward;↵
|
| | | 6 | ↵
|
5 | /**↵ | | 7 | /**↵
|
6 | * @return Returns the title.↵ | | 8 | * Returns the id.↵
|
| | | 9 | * @return Long↵
|
7 | */↵ | | 10 | */↵
|
8 | public String getTitle() {↵ | | 11 | public Long getId() {↵
|
9 | return title;↵ | | 12 | return id;↵
|
10 | }↵ | | 13 | }↵
|
11 | ↵ | | 14 | ↵
|
12 | /**↵ | | 15 | /**↵
|
13 | * @param title The title to set.↵ | | 16 | * ↵
|
14 | */↵ | | |
|
15 | public void setTitle(String title) {↵ | | |
|
16 | this.title = titl↵ | | 17 | Returns the name.↵
|
| | | 18 | * @return String↵
|
| | | 19 | */↵
|
| | | 20 | public String getName() {↵
|
17 | e;↵ | | 21 | return name;↵
|
18 | }↵ | | 22 | }↵
|
19 | ↵ | | 23 | ↵
|
20 | /**↵ | | 24 | /**↵
|
21 | * @return Returns the manager.↵ | | 25 | * ↵
|
22 | */↵ | | |
|
23 | public Employee getManager() {↵ | | |
|
24 | return manager↵ | | 26 | Sets the id.↵
|
| | | 27 | * @param id The id to set↵
|
| | | 28 | */↵
|
| | | 29 | public void setId(Long id) {↵
|
25 | ;↵ | | 30 | this.id = id;↵
|
26 | }↵ | | 31 | }↵
|
27 | ↵ | | 32 | ↵
|
28 | /**↵ | | 33 | /**↵
|
29 | ↵ | | 34 | * Sets the name.↵
|
30 | * @param manager The manager to set.↵ | | 35 | * @param name The name to set↵
|
31 | */↵ | | 36 | */↵
|
32 | public void setManager(Employee manager) {↵ | | 37 | public void setName(String name) {↵
|
33 | this.manager = manager;↵ | | 38 | this.name = ↵
|
34 | }↵ | | |
|
35 | /**↵ | | |
|
36 | * @return Returns the salary.↵ | | |
|
37 | */↵ | | |
|
38 | public BigDecimal getSal↵ | | 39 | name;↵
|
| | | 40 | }↵
|
| | | 41 | ↵
|
39 | ary() {↵ | | 42 | public E getForward() {↵
|
40 | return salary;↵ | | 43 | return forward;↵
|
41 | }↵ | | 44 | }↵
|
42 | /**↵ | | |
|
43 | * @param salary The salary to set.↵ | | |
|
44 | */↵ | | |
|
45 | public void setSalary(BigDecimal salary) {↵ | | 45 | public void set↵
|
46 | this.sal↵ | | 46 | Forward(E e) {↵
|
47 | ary = salary | | 47 | forward = e
|