K - Type of key of the map.V - Type of value of the map.public class InheritantMap<K,V> extends Object implements Map<K,V>
| Constructor and Description |
|---|
InheritantMap(Map<K,V> parentMap,
boolean updateOnParent)
Constructor that uses a
HashMap as a child Map. |
InheritantMap(Map<K,V> parentMap,
Map<K,V> childMap,
boolean updateOnParent)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object obj) |
V |
get(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
putWithoutChecks(K key,
V value)
Same as
put(Object, Object) but without checking reserved words. |
V |
remove(Object key) |
int |
size() |
Collection<V> |
values() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic InheritantMap(Map<K,V> parentMap, boolean updateOnParent)
HashMap as a child Map.parentMap - The map that holds key-value pairs that are accessible, but not modifiable via this
map instance.updateOnParent - In case of true, those keys will be updated on the parent that were already available
there, otherwise every operation will be processed on the child map.public InheritantMap(Map<K,V> parentMap, Map<K,V> childMap, boolean updateOnParent)
parentMap - The map that holds key-value pairs that are accessible, but not modifiable via this
map instance.childMap - The child map that is read first or updated directly.updateOnParent - In case of true, those keys will be updated on the parent that were already available
there, otherwise every operation will be processed on the child map.public boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>public boolean equals(Object obj)
public int hashCode()
public V putWithoutChecks(K key, V value)
put(Object, Object) but without checking reserved words.key - The key.value - The value.Copyright © 2011–2015 Everit OpenSource. All rights reserved.