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:
java.util.Comparator<Suggestion>

public class CostAndFreqComparingSuggestionComparator
extends java.lang.Object
implements java.util.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 java.util.Comparator<Suggestion>


Copyright © 2003-2009 Atlassian Pty Ltd. All Rights Reserved.