Class HitGroupsLastComparator

java.lang.Object
com.yahoo.search.result.ChainableComparator
com.yahoo.search.result.HitGroupsLastComparator
All Implemented Interfaces:
Comparator<Hit>

public class HitGroupsLastComparator extends ChainableComparator
Ensures that HitGroups are placed last in the result.
Author:
Tony Vaagenes
  • Constructor Details

    • HitGroupsLastComparator

      public HitGroupsLastComparator(Comparator<Hit> secondaryComparator)
  • Method Details

    • 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, always return super.compare(first,second) at the end of the subclass' implementation.
      Specified by:
      compare in interface Comparator<Hit>
      Overrides:
      compare in class ChainableComparator
    • toString

      public String toString()
      Overrides:
      toString in class Object