Package com.yahoo.search.result
Class MetaHitsFirstComparator
java.lang.Object
com.yahoo.search.result.ChainableComparator
com.yahoo.search.result.MetaHitsFirstComparator
- All Implemented Interfaces:
Comparator<Hit>
Ensures that meta hits are sorted before normal hits. All meta hits are
considered equal.
- Author:
- Tony Vaagenes
-
Constructor Summary
-
Method Summary
Methods inherited from class com.yahoo.search.result.ChainableComparator
getSecondaryComparator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
MetaHitsFirstComparator
-
-
Method Details
-
compare
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 interfaceComparator<Hit>
- Overrides:
compare
in classChainableComparator
-
toString
-