Efficiently “modifying” an ImmutableMap

后端 未结 1 1500
清歌不尽
清歌不尽 2021-02-13 16:33

We\'re currently using Guava for its immutable collections but I was surprised to find that their maps don\'t have methods to easily create new maps with minor modifications. An

相关标签:
1条回答
  • 2021-02-13 16:50

    A bit unexpected the map of Functional Java is mutable like Guava's. The list is immutable though as I would expect.

    Googling for "persistent collection java" brought up: pcollections. There are's a Map implementation.

    Before actually using any other implementation I would benchmark the memory and performance characteristics against Guava. I would not be surprised if it's still better.

    0 讨论(0)
提交回复
热议问题