source: src/main/java/it/finki/tinki/helper/Matchmaker.java@ 4b1c93d

Last change on this file since 4b1c93d was 336d09e, checked in by Vzdra <vladko.zdravkovski@…>, 3 years ago

cleanup

  • Property mode set to 100644
File size: 557 bytes
Line 
1package it.finki.tinki.helper;
2
3import it.finki.tinki.model.Skill;
4import org.springframework.stereotype.Component;
5
6import java.util.List;
7
8@Component
9public 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.