Package-level declarations

Adapter classes that wrap a standard read-only Collection, List, Set, or Map and expose it through the corresponding Immutable* interface by delegation. Useful when an existing collection needs to fit into an API that expects an immutable type. Note that adapters do not freeze the underlying collection; the immutability contract holds only if the caller guarantees the wrapped instance is not mutated elsewhere.

Types

Link copied to clipboard
Link copied to clipboard
class ImmutableMapAdapter<K, out V>(impl: Map<K, V>) : ImmutableMap<K, V> , Map<K, V>
Link copied to clipboard