Commit 9a5c37e4 authored by Uma Vani Ravuri's avatar Uma Vani Ravuri

Replace Employee.java

parent 40f3ebfd
......@@ -8,11 +8,10 @@ public class Employee implements Comparator<Employee>{
String id;
String firstName;
String lastName;
String departmentNames;
List<String> departmentNames;
public Employee() {
super();
// TODO Auto-generated constructor stub
}
public String getId() {
......@@ -39,20 +38,23 @@ public class Employee implements Comparator<Employee>{
this.lastName = lastName;
}
public String getDepartmentNames() {
public List<String> getDepartmentNames() {
return departmentNames;
}
public void setDepartmentNames(String departmentNames) {
public void setDepartmentNames(List<String> departmentNames) {
this.departmentNames = departmentNames;
}
public Employee(String id, String firstName, String lastName, String departmentNames) {
public Employee(String id, String firstName, String lastName, List<String> list) {
super();
this.id = id;
this.firstName = firstName;
this.lastName = lastName;
this.departmentNames = departmentNames;
this.departmentNames = list;
}
@Override
......@@ -63,7 +65,6 @@ public class Employee implements Comparator<Employee>{
@Override
public int compare(Employee o1, Employee o2) {
// TODO Auto-generated method stub
return o1.firstName.compareTo(o2.firstName);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment