K
- the type of keys maintained by this mapV
- the type of mapped values@Beta public abstract class SharedSingletonMap<K,V> extends Object implements Serializable, UnmodifiableMapPhase<K,V>
Map
interface which stores a single mapping. The key set is shared among all instances
which contain the same key. This implementation does not support null keys or values.Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
static <K,V> SharedSingletonMap<K,V> |
copyOf(Map<K,V> m)
Deprecated.
Use
orderedCopyOf(Map) or unorderedCopyOf(Map) instead. |
SingletonSet<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object obj) |
V |
get(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
SingletonSet<K> |
keySet() |
static <K,V> SharedSingletonMap<K,V> |
of(K key,
V value)
Deprecated.
Use
orderedOf(Object, Object) or unorderedOf(Object, Object) instead. |
static <K,V> SharedSingletonMap<K,V> |
orderedCopyOf(Map<K,V> m) |
static <K,V> SharedSingletonMap<K,V> |
orderedOf(K key,
V value) |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
remove(Object key) |
int |
size() |
String |
toString() |
static <K,V> SharedSingletonMap<K,V> |
unorderedCopyOf(Map<K,V> m) |
static <K,V> SharedSingletonMap<K,V> |
unorderedOf(K key,
V value) |
SingletonSet<V> |
values() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
toModifiableMap
@Deprecated public static <K,V> SharedSingletonMap<K,V> of(K key, V value)
public static <K,V> SharedSingletonMap<K,V> orderedOf(K key, V value)
public static <K,V> SharedSingletonMap<K,V> unorderedOf(K key, V value)
@Deprecated public static <K,V> SharedSingletonMap<K,V> copyOf(Map<K,V> m)
public static <K,V> SharedSingletonMap<K,V> orderedCopyOf(Map<K,V> m)
public static <K,V> SharedSingletonMap<K,V> unorderedCopyOf(Map<K,V> m)
public final SingletonSet<Map.Entry<K,V>> entrySet()
public final boolean containsKey(Object key)
containsKey
in interface Map<K,V>
public final boolean containsValue(Object value)
containsValue
in interface Map<K,V>
public final int hashCode()
public final boolean equals(Object obj)
Copyright © 2017 OpenDaylight. All rights reserved.