forked from Rapter1990/JavaStreamAPIExamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmployee.java
More file actions
90 lines (60 loc) · 1.5 KB
/
Employee.java
File metadata and controls
90 lines (60 loc) · 1.5 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package employeedata;
import java.util.List;
public class Employee{
private String name;
private int experience;
private Designation designation;
private Unit unit;
private List<Skill> skills;
private String email;
public Employee(String name, int experience, Designation designation, Unit unit, List<Skill> skills) {
this.name = name;
this.experience = experience;
this.designation = designation;
this.unit = unit;
this.skills = skills;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getExperience() {
return experience;
}
public void setExperience(int experience) {
this.experience = experience;
}
public Designation getDesignation() {
return designation;
}
public void setDesignation(Designation designation) {
this.designation = designation;
}
public Unit getUnit() {
return unit;
}
public void setUnit(Unit unit) {
this.unit = unit;
}
public List<Skill> getSkills() {
return skills;
}
public void setSkills(List<Skill> skills) {
this.skills = skills;
}
public String toString() {
return this.getName() + " with " + this.getExperience() + " years of experience \n";
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public static boolean hasJavaSkills(Employee employee) {
System.out.println("Checking if employee has Java skils : " + employee.getName());
return employee.getSkills().contains(Skill.JAVA);
}
}