K - the type parameterV - the type parameterpublic class MultiLevelMap<K,V> extends Object implements CascadingMap<K,V>
| Modifier and Type | Class and Description |
|---|---|
protected class |
MultiLevelMap.EntryIterator
The type Entry iterator.
|
protected class |
MultiLevelMap.KeyIterator
The type Key iterator.
|
protected class |
MultiLevelMap.MultiLevelEntrySet
The type Multi level entry set.
|
protected class |
MultiLevelMap.MultiLevelKeySet
The type Multi level key set.
|
| Modifier and Type | Field and Description |
|---|---|
protected Map<K,V> |
currentLevel
The Current level.
|
protected MultiLevelMap.MultiLevelEntrySet |
entrySetView
The Entry set view.
|
protected static String |
ERR_ITEMS_NOT_ENTRIES
The constant ERR_ITEMS_NOT_ENTRIES.
|
protected MultiLevelMap.MultiLevelKeySet |
keySetView
The Key set view.
|
protected Map<K,V> |
parent
The Parent.
|
| Modifier | Constructor and Description |
|---|---|
protected |
MultiLevelMap(Map<? extends K,? extends V> current,
Map<? extends K,? extends V> parent)
Instantiates a new Multi level map.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
clearCurrentMap()
Clear current map.
|
void |
clearParentMap()
Clear parent map.
|
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
static <K1,V1> MultiLevelMap<K1,V1> |
create()
Create multi level map.
|
static <K1,V1> MultiLevelMap<K1,V1> |
createWithContentAndParent(Map<? extends K1,? extends V1> content,
Map<? extends K1,? extends V1> parentMap)
Create with content and parent.
|
static <K1,V1> MultiLevelMap<K1,V1> |
createWithParent(Map<? extends K1,? extends V1> parentMap)
Create with parent.
|
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
Map<K,V> |
getParentMap()
Gets parent map.
|
boolean |
hasParentMap()
Has parent map.
|
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> otherMap) |
V |
remove(Object key) |
V |
removeFromCurrentMap(Object key)
Remove from current map.
|
void |
setParentMap(Map<? extends K,? extends V> prnt)
Sets parent map.
|
int |
size() |
Collection<V> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllprotected static final String ERR_ITEMS_NOT_ENTRIES
protected final transient MultiLevelMap.MultiLevelEntrySet entrySetView
protected final transient MultiLevelMap.MultiLevelKeySet keySetView
public static <K1,V1> MultiLevelMap<K1,V1> create()
K1 - the type parameterV1 - the type parameterpublic static <K1,V1> MultiLevelMap<K1,V1> createWithParent(Map<? extends K1,? extends V1> parentMap)
K1 - the type parameterV1 - the type parameterparentMap - the parent mappublic static <K1,V1> MultiLevelMap<K1,V1> createWithContentAndParent(Map<? extends K1,? extends V1> content, Map<? extends K1,? extends V1> parentMap)
K1 - the type parameterV1 - the type parametercontent - the contentparentMap - the parent mappublic Map<K,V> getParentMap()
CascadingMapgetParentMap in interface CascadingMap<K,V>public void setParentMap(Map<? extends K,? extends V> prnt)
CascadingMapsetParentMap in interface CascadingMap<K,V>prnt - the parent mappublic boolean hasParentMap()
CascadingMaphasParentMap in interface CascadingMap<K,V>public void clearCurrentMap()
CascadingMapclearCurrentMap in interface CascadingMap<K,V>public void clearParentMap()
CascadingMapclearParentMap in interface CascadingMap<K,V>public boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>public V removeFromCurrentMap(Object key)
CascadingMapremoveFromCurrentMap in interface CascadingMap<K,V>key - the keyCopyright © 2014 Boleslav Bobcik - Auderis. All rights reserved.