Proposed API for JEP 259: Stack-Walking API

David M. Lloyd david.lloyd at redhat.com
Fri Oct 30 21:02:46 UTC 2015


On 10/30/2015 03:26 PM, Remi Forax wrote:
>> The batchSizeMapper should probably be something better than a
>> Function<Integer,Integer>, no?  All that boxing seems unnecessary... the
>> next best candidate I can see though is IntToLongFunction.  I wonder why
>> we didn't do an IntToIntFunction in JSR 335.  Or maybe the stream itself
>> should be somehow made aware of the optimum batch size.  What's the use
>> case for changing the batch size as you iterate?  Is the traversal
>> *that* expensive?
>
> IntToIntFunction => IntUnaryOperator.

Ah that's the one!  You know I think that this is more than once that I 
looked for, and didn't find, that interface.  Some kind of mental blind 
spot I guess. :-)

-- 
- DML



More information about the core-libs-dev mailing list