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>{ ...@@ -8,11 +8,10 @@ public class Employee implements Comparator<Employee>{
String id; String id;
String firstName; String firstName;
String lastName; String lastName;
String departmentNames; List<String> departmentNames;
public Employee() { public Employee() {
super(); super();
// TODO Auto-generated constructor stub
} }
public String getId() { public String getId() {
...@@ -39,20 +38,23 @@ public class Employee implements Comparator<Employee>{ ...@@ -39,20 +38,23 @@ public class Employee implements Comparator<Employee>{
this.lastName = lastName; this.lastName = lastName;
} }
public String getDepartmentNames() {
public List<String> getDepartmentNames() {
return departmentNames; return departmentNames;
} }
public void setDepartmentNames(String departmentNames) { public void setDepartmentNames(List<String> departmentNames) {
this.departmentNames = 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(); super();
this.id = id; this.id = id;
this.firstName = firstName; this.firstName = firstName;
this.lastName = lastName; this.lastName = lastName;
this.departmentNames = departmentNames; this.departmentNames = list;
} }
@Override @Override
...@@ -63,7 +65,6 @@ public class Employee implements Comparator<Employee>{ ...@@ -63,7 +65,6 @@ public class Employee implements Comparator<Employee>{
@Override @Override
public int compare(Employee o1, Employee o2) { public int compare(Employee o1, Employee o2) {
// TODO Auto-generated method stub
return o1.firstName.compareTo(o2.firstName); 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