vsop-479 commented on PR #15823:
URL: https://github.com/apache/lucene/pull/15823#issuecomment-4108360594
I implemented it with `Iterables/Iterators` (they only have transform
function for now).
Please take a look when you get a chance @dweiss, @gsmiller .
I like the design of `Iterables/Iterators`. But, there are some notes i
think we may care in Guava's `Iterables`:
> Java 8+ users: several common uses for this class are now more
comprehensively addressed by the new Stream library. Read the method
documentation below for comparisons. This class is not being deprecated, but we
gently encourage you to migrate to streams.
Note on `Iterables#transform`:
> Stream equivalent: Stream.map.
So, I test it with `Stream`, it works too. The code with stream likes:
````
elements.stream().map(elementTransformer).forEach(e -> {
this.heap[size + 1] = e;
this.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]