Skip to content

Commit

Permalink
Explicitly specify Entry as the type of object for the PriorityQueue
Browse files Browse the repository at this point in the history
in LongValueFacetCounts

ant compilation fails if we don't provide an explicit type
  • Loading branch information
Gautam Worah committed Jul 2, 2021
1 parent d5a6d9a commit f10ca3a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ private static class Entry {
/** Returns the specified top number of facets, sorted by count. */
public FacetResult getTopChildrenSortByCount(int topN) {
PriorityQueue<Entry> pq =
new PriorityQueue<>(Math.min(topN, counts.length + hashCounts.size())) {
new PriorityQueue<Entry>(Math.min(topN, counts.length + hashCounts.size())) {
@Override
protected boolean lessThan(Entry a, Entry b) {
// sort by count descending, breaking ties by value ascending:
Expand Down

0 comments on commit f10ca3a

Please sign in to comment.