public abstract class FacetResultsComparator extends Object implements Comparator<SortableFacet.FacetBucket>
Modifier and Type | Field and Description |
---|---|
protected int |
resultMult |
Constructor and Description |
---|
FacetResultsComparator()
Create a results comparator assuming an ascending ordering.
|
Modifier and Type | Method and Description |
---|---|
abstract int |
compare(SortableFacet.FacetBucket b1,
SortableFacet.FacetBucket b2)
Compare one facet bucket to another.
|
void |
setDirection(boolean ascending)
Set the order direction for comparison.
|
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 FacetResultsComparator()
public void setDirection(boolean ascending)
ascending
- whether to compare using an ascending orderingpublic abstract int compare(SortableFacet.FacetBucket b1, SortableFacet.FacetBucket b2)
compare
in interface Comparator<SortableFacet.FacetBucket>
b1
- the first bucket to compareb2
- the second bucket to compareCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.