Repository navigation
Conversation
|
I won't be able to look at this for a couple of weeks as I'll be travelling. Did you use some of the infrastructure for primitive functions (look for PRIMITIVE_FUNCTION in gencsources.sh)? |
|
I tried to use JDK_PRIMITIVE_FUNCTION, but ran into many places it didn't fit. For instance, in |
|
@vigna just a reminder to get eyes on this. |
|
Ahem, I know I'm late, but I'm on vacation now. I'll be back to work in full in a couple of weeks. |
|
So, the way we did that for other containers is quite different—see, e.g., toSet() in OpenHashSet.drv. It would be better to try to follow the same scheme. |
This adds collectors for
Streamto fastutil Maps.Future improvements would be to investigate supporting primitive streams (e.g.
IntStream) and improving the type signature for collectors wherecharis the key or value. Whencharis the key, the functions are forint. Whencharis the value, the functions are forObject.Also there is boxing that could be avoided using more specialized function types, likeInt2IntFunctioninstead ofToIntFunction<Integer>.