Skip to content

Commit

Permalink
Small coding style change in hobbymethods class
Browse files Browse the repository at this point in the history
  • Loading branch information
jorge-cab committed Aug 2, 2021
1 parent 585e955 commit cb05475
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ public List<PairingsByTag> getSimilarHobbiesByTag(List<Hobby> hobbies1, List<Hob
List<Hobby> equalHobbies = getEqualHobbies(hobbies1, hobbies2);
Hashtable<String, List<Hobby>> userHobbiesPerTag = new Hashtable<>();
Hashtable<String, List<Hobby>> qrHobbiesPerTag = new Hashtable<>();
Set<Hobby> setAlreadyPairedHobbies = new HashSet<>();

for (Hobby hobby : equalHobbies) {
setAlreadyPairedHobbies.add(hobby);
}
Set<Hobby> setAlreadyPairedHobbies = new HashSet<>(equalHobbies);

for (Hobby hobby : hobbies1) {
if (!setAlreadyPairedHobbies.contains(hobby)) {
Expand Down Expand Up @@ -82,7 +79,7 @@ public List<PairingsByTag> getSimilarHobbiesByTag(List<Hobby> hobbies1, List<Hob
currPairing.setPairedHobbies(qrHobbiesPerTag.get(tag));
pairingsByTags.add(currPairing);
}

return pairingsByTags;
}
}

0 comments on commit cb05475

Please sign in to comment.