Why don’t primitive Stream have collect(Collector)?

We did in fact prototype some Collector.OfXxx specializations. What we found — in addition to the obvious annoyance of more specialized types — was that this was not really very useful without having a full complement of primitive-specialized collections (like Trove does, or GS-Collections, but which the JDK does not have). Without an IntArrayList, for example, a Collector.OfInt merely pushes the boxing somewhere else — from the Collector to the container — which no big win, and lots more API surface.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)