Class ProjectsSuggestionsGenerator.ProjectComparator
- java.lang.Object
-
- org.ametys.plugins.workspaces.suggestions.ProjectsSuggestionsGenerator.ProjectComparator
-
- All Implemented Interfaces:
Comparator<Project>
- Enclosing class:
- ProjectsSuggestionsGenerator
class ProjectsSuggestionsGenerator.ProjectComparator extends Object implements Comparator<Project>
-
-
Field Summary
Fields Modifier and Type Field Description private Collection<String>
_baseCategories
private Collection<String>
_baseKeywords
-
Constructor Summary
Constructors Constructor Description ProjectComparator(Collection<String> baseCategories, Collection<String> baseKeywords)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Project p1, Project p2)
(package private) int
countCommonCategories(Project project)
(package private) int
countCommonKeywords(Project project)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
_baseKeywords
private Collection<String> _baseKeywords
-
_baseCategories
private Collection<String> _baseCategories
-
-
Constructor Detail
-
ProjectComparator
public ProjectComparator(Collection<String> baseCategories, Collection<String> baseKeywords)
-
-
Method Detail
-
compare
public int compare(Project p1, Project p2)
- Specified by:
compare
in interfaceComparator<Project>
-
countCommonCategories
int countCommonCategories(Project project)
-
countCommonKeywords
int countCommonKeywords(Project project)
-
-