Class MutableOffsetMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
org.opendaylight.yangtools.util.MutableOffsetMap<K,V>
Type Parameters:
K - the type of keys maintained by this map
V - the type of mapped values
All Implemented Interfaces:
Cloneable, Map<K,V>, Mutable, ModifiableMapPhase<K,V>

@Beta public abstract class MutableOffsetMap<K,V> extends AbstractMap<K,V> implements Cloneable, ModifiableMapPhase<K,V>
A mutable version of ImmutableOffsetMap. It inherits the set of mappings from the immutable version and allows updating/removing existing mappings. New mappings are stored in a dedicated LinkedHashMap to preserve insertion order. It also tracks the need to duplicate the backing array, so the sequence of ImmutableOffsetMap<K, V> source; ImmutableOffsetMap<K, V> result = source.createMutableClone().immutableCopy(); results in source and result sharing the backing objects.

This map does not support null keys nor values.