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
RevLine 
[d509a04]1package it.finki.tinki.helper;
2
3import it.finki.tinki.model.Skill;
[509cb95]4import org.springframework.stereotype.Component;
5
[d509a04]6import java.util.List;
7
[509cb95]8@Component
[d509a04]9public class Matchmaker {
10
[509cb95]11 public static float match(List<Skill> work, List<Skill> user){
[d509a04]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
[336d09e]24 System.out.println(k/coef);
25
[d509a04]26 return k/coef;
27 }
28
29}
Note: See TracBrowser for help on using the repository browser.