1 | public class SubMulti extends Multi {↵ | | 1 | public class ↵
|
2 | private float amount;↵ | | |
|
3 | private SubMulti parent;↵ | | |
|
4 | private List children;↵ | | |
|
5 | private List moreChildren;↵ | | |
|
6 | /**↵ | | |
|
7 | * Returns the amount.↵ | | |
|
8 | * @return float↵ | | |
|
9 | */↵ | | |
|
10 | public float getAmount() {↵ | | |
|
11 | return amount;↵ | | |
|
12 | }↵ | | |
|
13 | ↵ | | |
|
14 | /**↵ | | |
|
15 | * Sets the amount.↵ | | |
|
16 | * @param amount The amount to set↵ | | |
|
17 | */↵ | | |
|
18 | public void setAmount(float amount) {↵ | | |
|
19 | this.amount = amount;↵ | | |
|
20 | }↵ | | |
|
21 | ↵ | | |
|
22 | /**↵ | | |
|
23 | * Returns the childen.↵ | | |
|
24 | * @return List↵ | | |
|
25 | */↵ | | |
|
26 | public List getChildren() {↵ | | |
|
27 | return chil↵ | | 2 | Human {↵
|
| | | 3 | private Long id;↵
|
| | | 4 | private String name;↵
|
| | | 5 | private char sex;↵
|
| | | 6 | private String address;↵
|
| | | 7 | ↵
|
| | | 8 | public void setAddress(String address) {↵
|
28 | dren;↵ | | 9 | this.address = address;↵
|
29 | }↵ | | 10 | }↵
|
30 | ↵ | | 11 | ↵
|
31 | /**↵ | | |
|
32 | * Returns the parent.↵ | | |
|
33 | * @return SubMulti↵ | | |
|
34 | */↵ | | |
|
35 | public SubMulti getParent() {↵ | | 12 | public S↵
|
36 | return parent;↵ | | |
|
37 | }↵ | | |
|
38 | ↵ | | |
|
39 | /**↵ | | |
|
40 | * Sets the childen.↵ | | |
|
41 | * @param childen The childen to set↵ | | |
|
42 | */↵ | | |
|
43 | public void setChildren(List children) {↵ | | |
|
44 | this.children = children;↵ | | |
|
45 | }↵ | | |
|
46 | ↵ | | |
|
47 | /**↵ | | |
|
48 | * Sets the parent.↵ | | |
|
49 | * @param parent The parent to set↵ | | |
|
50 | */↵ | | |
|
51 | public void setParent(SubMulti parent↵ | | 13 | tring getAddress() {↵
|
| | | 14 | return address;↵
|
| | | 15 | }↵
|
| | | 16 | public void setSex(char sex) {↵
|
| | | 17 | this.sex = sex;↵
|
| | | 18 | }↵
|
| | | 19 | public char getSex() {↵
|
| | | 20 | return sex;↵
|
| | | 21 | }↵
|
52 | ) {↵ | | 22 | public void setName(String name) {↵
|
53 | this.parent = parent;↵ | | 23 | this.↵
|
54 | }↵ | | |
|
55 | ↵ | | |
|
56 | /**↵ | | |
|
57 | * Returns the moreChildren.↵ | | |
|
58 | * @return List↵ | | |
|
59 | */↵ | | |
|
60 | public List getMoreChildren() {↵ | | |
|
61 | return moreChildren;↵ | | |
|
62 | }↵ | | |
|
|
63 | /**↵ | | |
|
64 | * Sets the moreChildren.↵ | | |
|
65 | * @param moreChildren The moreChildren to set↵ | | |
|
66 | */↵ | | |
|
67 | public void setMoreChildren(List moreChildren) {↵ | | |
|
68 | this.moreChildren = moreChildren↵ | | 24 | name = name;↵
|
| | | 25 | }↵
|
| | | 26 | public String getName() {↵
|
| | | 27 | return name;↵
|
| | | 28 | }↵
|
| | | 29 | public void setId(Long id) {↵
|
| | | 30 | this.id = id;↵
|
| | | 31 | }↵
|
| | | 32 | public Long getId() {↵
|
69 | ;↵ | | 33 | return id;↵
|
70 | | | 34 |
|