> Adds overrides for common Map operations to avoid having to allocate the
> entrySet for Collectors$Partition maps.
Viktor Klang has updated the pull request incrementally with one additional
commit since the last revision:
Let auto-boxing do its thing for Collectors.get(key)
-
On Wed, 12 Apr 2023 07:55:28 GMT, Viktor Klang wrote:
>> Adds overrides for common Map operations to avoid having to allocate the
>> entrySet for Collectors$Partition maps.
>
> Viktor Klang has updated the pull request incrementally with one additional
> commit since the last revision:
>
> L
On Wed, 5 Apr 2023 09:19:57 GMT, Viktor Klang wrote:
> Adds overrides for common Map operations to avoid having to allocate the
> entrySet for Collectors$Partition maps.
OK, the change is probably good, including removal of the `booleanValue` call.
I'm not sure `containsKey` and `containsValue
On Tue, 11 Apr 2023 01:18:53 GMT, Stuart Marks wrote:
>> Adds overrides for common Map operations to avoid having to allocate the
>> entrySet for Collectors$Partition maps.
>
> I don't think there is any useful relationship between this work at
> SequencedCollections / SequencedMap. The return
On Wed, 5 Apr 2023 09:19:57 GMT, Viktor Klang wrote:
> Adds overrides for common Map operations to avoid having to allocate the
> entrySet for Collectors$Partition maps.
I don't think there is any useful relationship between this work at
SequencedCollections / SequencedMap. The return type of
On Wed, 5 Apr 2023 12:49:31 GMT, Tagir F. Valeev wrote:
>> Adds overrides for common Map operations to avoid having to allocate the
>> entrySet for Collectors$Partition maps.
>
> Another thing I noticed is that `keySet()` of this map is a constant. If we
> want to preserve the order, we can use
On Wed, 5 Apr 2023 12:52:11 GMT, Andrey Turbanov wrote:
>> Adds overrides for common Map operations to avoid having to allocate the
>> entrySet for Collectors$Partition maps.
>
> src/java.base/share/classes/java/util/stream/Collectors.java line 1988:
>
>> 1986: public T get(Object key)
On Wed, 5 Apr 2023 09:19:57 GMT, Viktor Klang wrote:
> Adds overrides for common Map operations to avoid having to allocate the
> entrySet for Collectors$Partition maps.
Another thing I noticed is that `keySet()` of this map is a constant. If we
want to preserve the order, we can use something
On Wed, 5 Apr 2023 09:19:57 GMT, Viktor Klang wrote:
> Adds overrides for common Map operations to avoid having to allocate the
> entrySet for Collectors$Partition maps.
src/java.base/share/classes/java/util/stream/Collectors.java line 1988:
> 1986: public T get(Object key) {
> 1987:
On Wed, 5 Apr 2023 09:19:57 GMT, Viktor Klang wrote:
> Adds overrides for common Map operations to avoid having to allocate the
> entrySet for Collectors$Partition maps.
Interesting improvement!
How about `forEach` and `values`? These look quite easy to implement.
@Override
public vo
On Wed, 5 Apr 2023 09:19:57 GMT, Viktor Klang wrote:
> Adds overrides for common Map operations to avoid having to allocate the
> entrySet for Collectors$Partition maps.
src/java.base/share/classes/java/util/stream/Collectors.java line 1988:
> 1986: public T get(Object key) {
> 1987:
Adds overrides for common Map operations to avoid having to allocate the
entrySet for Collectors$Partition maps.
-
Commit messages:
- Overriding containsKey and containsValue of Collectors
- JDK-8170945: override more Map-methods on Collectors
Changes: https://git.openjdk.org/jdk/
12 matches
Mail list logo