1 | public class Parent {↵ | | 1 | public class ↵
|
2 | private Long id↵ | | 2 | Alien extends Being {↵
|
3 | ;↵ | | 3 | private String species;↵
|
4 | private String name;↵ | | 4 | private Hive hive;↵
|
5 | private Collection children = new HashSet();↵ | | 5 | private List hivemates = new ArrayList();↵
|
6 | /**↵ | | 6 | /**↵
|
7 | * @return Returns the children.↵ | | 7 | * @return Returns the species.↵
|
8 | */↵ | | 8 | */↵
|
9 | public Collection getChildren() {↵ | | 9 | public String getSpecies() {↵
|
10 | return children;↵ | | 10 | return species;↵
|
11 | }↵ | | 11 | }↵
|
12 | /**↵ | | 12 | /**↵
|
13 | * @param children The children to set.↵ | | 13 | * @param species The species to set.↵
|
14 | */↵ | | 14 | */↵
|
15 | public void setChildren(Collection children) {↵ | | 15 | public void set↵
|
16 | this.children = children;↵ | | |
|
17 | }↵ | | |
|
18 | /**↵ | | |
|
19 | * @return Returns the id.↵ | | |
|
20 | */↵ | | |
|
21 | public Long getId↵ | | 16 | Species(String species) {↵
|
| | | 17 | this.species = species;↵
|
| | | 18 | }↵
|
22 | () {↵ | | 19 | public Hive getHive() {↵
|
23 | return id;↵ | | 20 | return hive;↵
|
24 | }↵ | | 21 | }↵
|
25 | /**↵ | | 22 | ↵
|
26 | * @param id The id to set.↵ | | |
|
27 | */↵ | | |
|
28 | public void setId(Long id) {↵ | | 23 | public void setHive(Hive hive) {↵
|
29 | this.id = id;↵ | | 24 | this.↵
|
30 | }↵ | | |
|
31 | /**↵ | | |
|
32 | * @return Returns the name.↵ | | |
|
33 | */↵ | | |
|
34 | public String getName() {↵ | | |
|
35 | return name;↵ | | |
|
36 | }↵ | | |
|
37 | /**↵ | | |
|
38 | * @param name The name to set.↵ | | |
|
39 | */↵ | | |
|
40 | public void setName(String name) {↵ | | |
|
41 | this.name = name | | 25 | hive = hive;↵
|
| | | 26 | }↵
|
| | | 27 | public List getHivemates() {↵
|
| | | 28 | return hivemates;↵
|
| | | 29 | }↵
|
| | | 30 | public void setHivemates(List hivemates) {↵
|
| | | 31 | this.hivemates = hivemates
|