Jean-Francois Leveque

Passage de Set en List pour les ensembles de recommandations.

1 package org.legrog.recommendation.process; 1 package org.legrog.recommendation.process;
2 2
3 -import java.util.HashSet; 3 +import java.util.ArrayList;
4 -import java.util.Set; 4 +import java.util.List;
5 5
6 public class ProcessingRecommendations { 6 public class ProcessingRecommendations {
7 - Set<RecommendationElement> recommendations; 7 + List<RecommendationElement> recommendations;
8 8
9 public ProcessingRecommendations() { 9 public ProcessingRecommendations() {
10 - recommendations = new HashSet<>(); 10 + recommendations = new ArrayList<>();
11 } 11 }
12 12
13 public void addRecommentation(RecommendationElement recommendationElement) { 13 public void addRecommentation(RecommendationElement recommendationElement) {
14 recommendations.add(recommendationElement); 14 recommendations.add(recommendationElement);
15 } 15 }
16 16
17 - public Set<RecommendationElement> getRecommendations() { 17 + public List<RecommendationElement> getRecommendations() {
18 return recommendations; 18 return recommendations;
19 } 19 }
20 } 20 }
...\ No newline at end of file ...\ No newline at end of file
......