class RelevanceComparator extends ChainableComparator
Constructor and Description |
---|
RelevanceComparator(Comparator<Hit> secondaryComparator)
Creates a relevance comparator, with an optional secondary comparator.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(Hit h1,
Hit h2)
Returns the comparison form the secondary comparison, or 0 if the secondary is null.
|
getSecondaryComparator
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public RelevanceComparator(Comparator<Hit> secondaryComparator)
public int compare(Hit h1, Hit h2)
ChainableComparator
return super.compare(first,second)
at the end of the subclass' implementation.compare
in interface Comparator<Hit>
compare
in class ChainableComparator
Copyright © 2018. All rights reserved.