Last change
on this file since 297bd16 was 336d09e, checked in by Vzdra <vladko.zdravkovski@…>, 4 years ago |
cleanup
|
-
Property mode
set to
100644
|
File size:
557 bytes
|
Line | |
---|
1 | package it.finki.tinki.helper;
|
---|
2 |
|
---|
3 | import it.finki.tinki.model.Skill;
|
---|
4 | import org.springframework.stereotype.Component;
|
---|
5 |
|
---|
6 | import java.util.List;
|
---|
7 |
|
---|
8 | @Component
|
---|
9 | public class Matchmaker {
|
---|
10 |
|
---|
11 | public static float match(List<Skill> work, List<Skill> user){
|
---|
12 |
|
---|
13 | float coef = work.size();
|
---|
14 | float k = 0;
|
---|
15 |
|
---|
16 | for (Skill skill : work) {
|
---|
17 | for (Skill value : user) {
|
---|
18 | if (value.equals(skill)) {
|
---|
19 | k++;
|
---|
20 | }
|
---|
21 | }
|
---|
22 | }
|
---|
23 |
|
---|
24 | System.out.println(k/coef);
|
---|
25 |
|
---|
26 | return k/coef;
|
---|
27 | }
|
---|
28 |
|
---|
29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.