forked from mastifikator/FantasyJavaPatterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnit.java
More file actions
51 lines (41 loc) · 1.06 KB
/
Unit.java
File metadata and controls
51 lines (41 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package Prototype;
public class Unit implements Cloneable{
private String race;
private String proffesion;
private String name;
public Unit(String race, String proffesion, String name) {
this.race = race;
this.proffesion = proffesion;
this.name = name;
}
public String getRace() {
return race;
}
public String getProffesion() {
return proffesion;
}
public String getName() {
return name;
}
public void setRace(String race) {
this.race = race;
}
public void setProffesion(String proffesion) {
this.proffesion = proffesion;
}
public void setName(String name) {
this.name = name;
}
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone();
}
@Override
public String toString() {
return "Unit{" +
"race='" + race + '\'' +
", proffesion='" + proffesion + '\'' +
", name='" + name + '\'' +
'}';
}
}