3 ms·
But you can build and use generic immutable collections.
by kuschku 9y ago
But you can build and use generic immutable collections.
- humanrebar 9y agoThis is true. My beef with Java collections is the type-tree-gymnastics library authors have to do to get the interfaces exposed properly. Generally people end up with a family of ImmutableContainers and a family of Containers that parallel each other. The mutable Containers usually inherit from the immutable versions. This is possible, but it's an unfortunate form of code duplication.