com.atlassian.confluence.search.didyoumean.lucene.comparators
Class CostAndFreqComparingSuggestionComparator
java.lang.Object
com.atlassian.confluence.search.didyoumean.lucene.comparators.CostAndFreqComparingSuggestionComparator
- All Implemented Interfaces:
- Comparator<Suggestion>
public class CostAndFreqComparingSuggestionComparator
- extends Object
- implements Comparator<Suggestion>
Compares suggestions by considering both cost and frequencies. Suggestions with lower cost and higher frequencies come before
suggestions with higher cost and lower frequencies.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CostAndFreqComparingSuggestionComparator
public CostAndFreqComparingSuggestionComparator()
compare
public int compare(Suggestion s1,
Suggestion s2)
- Specified by:
compare
in interface Comparator<Suggestion>