K - the type of keys maintained by this mapV - the type of mapped values@Beta public abstract class MutableOffsetMap<K,V> extends AbstractMap<K,V> implements Cloneable, ModifiableMapPhase<K,V>
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.
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
MutableOffsetMap<K,V> |
clone() |
boolean |
containsKey(Object key) |
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object o) |
V |
get(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
Set<K> |
keySet() |
static <K,V> MutableOffsetMap<K,V> |
ordered() |
static <K,V> MutableOffsetMap<K,V> |
orderedCopyOf(Map<K,V> m) |
V |
put(K key,
V value) |
V |
remove(Object key) |
int |
size() |
Map<K,V> |
toUnmodifiableMap()
Return an isolated unmodifiable version of this map.
|
static <K,V> MutableOffsetMap<K,V> |
unordered() |
static <K,V> MutableOffsetMap<K,V> |
unorderedCopyOf(Map<K,V> m) |
containsValue, putAll, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsValue, forEach, getOrDefault, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, valuespublic static <K,V> MutableOffsetMap<K,V> orderedCopyOf(Map<K,V> m)
public static <K,V> MutableOffsetMap<K,V> unorderedCopyOf(Map<K,V> m)
public static <K,V> MutableOffsetMap<K,V> ordered()
public static <K,V> MutableOffsetMap<K,V> unordered()
public final int size()
public final boolean isEmpty()
public final boolean containsKey(Object key)
containsKey in interface Map<K,V>containsKey in class AbstractMap<K,V>public final void clear()
@Nonnull public Map<K,V> toUnmodifiableMap()
ModifiableMapPhasetoUnmodifiableMap in interface ModifiableMapPhase<K,V>public MutableOffsetMap<K,V> clone()
clone in class AbstractMap<K,V>public final int hashCode()
public final boolean equals(Object o)
Copyright © 2018 OpenDaylight. All rights reserved.