Package com.yahoo.search.result
Class HitGroupsLastComparator
- java.lang.Object
-
- com.yahoo.search.result.ChainableComparator
-
- com.yahoo.search.result.HitGroupsLastComparator
-
- All Implemented Interfaces:
java.util.Comparator<Hit>
public class HitGroupsLastComparator extends ChainableComparator
Ensures that HitGroups are placed last in the result.- Author:
- Tony Vaagenes
-
-
Constructor Summary
Constructors Constructor Description HitGroupsLastComparator(java.util.Comparator<Hit> secondaryComparator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Hit left, Hit right)
Returns the comparison form the secondary comparison, or 0 if the secondary is null.java.lang.String
toString()
-
Methods inherited from class com.yahoo.search.result.ChainableComparator
getSecondaryComparator
-
-
-
-
Constructor Detail
-
HitGroupsLastComparator
public HitGroupsLastComparator(java.util.Comparator<Hit> secondaryComparator)
-
-
Method Detail
-
compare
public int compare(Hit left, Hit right)
Description copied from class:ChainableComparator
Returns the comparison form the secondary comparison, or 0 if the secondary is null. When overriding this in the subclass, alwaysreturn super.compare(first,second)
at the end of the subclass' implementation.- Specified by:
compare
in interfacejava.util.Comparator<Hit>
- Overrides:
compare
in classChainableComparator
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-