vsop-479 commented on code in PR #14814:
URL: https://github.com/apache/lucene/pull/14814#discussion_r2157890563
##########
lucene/core/src/java/org/apache/lucene/util/PriorityQueue.java:
##########
@@ -342,4 +342,13 @@ public T next() {
}
};
}
+
+ /**
+ * Returns {@code true} if this list contains no elements.
Review Comment:
> e.g. use this somewhere in Lucene or explain how you would like to use it
in your application?
I think it is useful when calling `PriorityQueue#pop` to fetch topN, just
like a `Collection`, e.g. `Stack`, `ArrayList`, etc.
Although `PriorityQueue` is not a `Collection`, and we can do this by
judging `PriorityQueue#size`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]