Class MetaHitsFirstComparator

  • All Implemented Interfaces:
    Comparator<Hit>

    public class MetaHitsFirstComparator
    extends ChainableComparator
    Ensures that meta hits are sorted before normal hits. All meta hits are considered equal.
    Author:
    Tony Vaagenes
    • Constructor Detail

      • MetaHitsFirstComparator

        public MetaHitsFirstComparator​(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, 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