shubhamvishu commented on PR #12427: URL: https://github.com/apache/lucene/pull/12427#issuecomment-1633502769
On the same note, since both the methods expects `Iterable` or `Iterators` why do we even need 2 separate methods here which are doing exactly the same thing i.e. iterating over the `ByteRef`'s and adding to automaton. It would have been much better if `BytesRefIterator` implemented the `Iterable`, `Iterator` interfaces in which case we could just have one method `StringsToAutomaton#build(Iterable)` which takes an `Iterable`. I don't see why do we even have a separate `BytesRefIterator` interface and not just using `Iterator` instead(maybe because its legacy code?) or is it that I'm missing something important here? -- 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