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

java.lang.Object
  extended by 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.


Constructor Summary
CostAndFreqComparingSuggestionComparator()
           
 
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

CostAndFreqComparingSuggestionComparator

public CostAndFreqComparingSuggestionComparator()
Method Detail

compare

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


Copyright © 2003-2011 Atlassian. All Rights Reserved.