com.atlassian.confluence.search.didyoumean.lucene.comparators
Class FrequencyComparingSuggestionComparator

java.lang.Object
  extended by com.atlassian.confluence.search.didyoumean.lucene.comparators.FrequencyComparingSuggestionComparator
All Implemented Interfaces:
Comparator<Suggestion>

public class FrequencyComparingSuggestionComparator
extends Object
implements Comparator<Suggestion>

Compares suggestions by the frequency that they occur in the user index. Specifically, it compares them on Suggestion.getFreq(). Suggestions with higher frequencies come before suggestions with lower frequencies.


Constructor Summary
FrequencyComparingSuggestionComparator()
           
 
Method Summary
 int compare(Suggestion s1, Suggestion s2)
           
 
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
 

Constructor Detail

FrequencyComparingSuggestionComparator

public FrequencyComparingSuggestionComparator()
Method Detail

compare

public int compare(Suggestion s1,
                   Suggestion s2)
Specified by:
compare in interface Comparator<Suggestion>


Copyright © 2003-2012 Atlassian. All Rights Reserved.