gsmiller commented on code in PR #13559: URL: https://github.com/apache/lucene/pull/13559#discussion_r1697630535
########## lucene/core/src/java/org/apache/lucene/util/BitSet.java: ########## @@ -92,6 +92,12 @@ public void clear() { */ public abstract int nextSetBit(int index); + /** + * Returns the index of the first set bit from start (inclusive) until end (inclusive). {@link Review Comment: Also... looking at the `#substring` method signature got me thinking about the API name. We if we reuse the `nextSetBit` naming for the new method since it's essentially the same thing but with an early-termination optimization. We could just overload that method signature with `#nextSetBit(int beginIndex, int endIndex)`. We could also later overload `#prevSetBit` in the same way if there's ever a real use-case. Pretty minor suggestion but might be a nice naming convention. Thoughts? ########## lucene/core/src/java/org/apache/lucene/util/BitSet.java: ########## @@ -92,6 +92,12 @@ public void clear() { */ public abstract int nextSetBit(int index); + /** + * Returns the index of the first set bit from start (inclusive) until end (inclusive). {@link Review Comment: Also... looking at the `#substring` method signature got me thinking about the API name. What if we reuse the `nextSetBit` naming for the new method since it's essentially the same thing but with an early-termination optimization. We could just overload that method signature with `#nextSetBit(int beginIndex, int endIndex)`. We could also later overload `#prevSetBit` in the same way if there's ever a real use-case. Pretty minor suggestion but might be a nice naming convention. Thoughts? -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org