Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
Java8Practies
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Uma Vani Ravuri
Java8Practies
Commits
9a5c37e4
Commit
9a5c37e4
authored
Sep 23, 2021
by
Uma Vani Ravuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace Employee.java
parent
40f3ebfd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
Employee.java
Java8PractiesProgram/src/com/java8/practies/Employee.java
+8
-7
No files found.
Java8PractiesProgram/src/com/java8/practies/Employee.java
View file @
9a5c37e4
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment