Package org.opendaylight.yangtools.util
Interface ModifiableMapPhase<K,V>
-
- Type Parameters:
K
- the type of keys maintained by this mapV
- the type of mapped values
- All Superinterfaces:
Map<K,V>
,Mutable
,MutationBehaviour<Mutable>
- All Known Implementing Classes:
MutableOffsetMap
@Beta public interface ModifiableMapPhase<K,V> extends Map<K,V>, Mutable
AMap
which can be modified and supports efficient conversion to an unmodifiable map. This interface is the logical counterpart toUnmodifiableMapPhase
, but it does not require implementations oftoUnmodifiableMap()
to return an implementation of that interface. The reason for that empty and singleton mappings are efficiently represented asImmutableMap
, which does not implementUnmodifiableMapPhase
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NonNull Map<K,V>
toUnmodifiableMap()
Return an isolated unmodifiable version of this map.-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
toUnmodifiableMap
@NonNull Map<K,V> toUnmodifiableMap()
Return an isolated unmodifiable version of this map. Returned object must not allow removal, addition or changing of mappings. Its mappings must match the mappings currently present in this map, but must not be affected by any subsequent changes to this map.- Returns:
- An unmodifiable version of this map.
-
-