Class MapContext<K,V>
java.lang.Object
org.apache.ofbiz.base.util.collections.MapContext<K,V>
- All Implemented Interfaces:
Map<K,
,V> LocalizedMap<V>
- Direct Known Subclasses:
MapStack
,MultivaluedMapContext
Map Context
Provide a combined view for a collection of maps which are organized in a deque.
All write operations affect only the head of the deque.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
Gets contexts.boolean
isEmpty()
keySet()
pop()
Remove and returns the Map from the top of the stack; if there is only one Map on the stack it returns null and does not remove itvoid
push()
Puts a new Map on the top of the stackvoid
Puts an existing Map on the top of the stack (top meaning will override lower layers on the stack)void
int
size()
toString()
values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
MapContext
public MapContext()
-
-
Method Details
-
getContexts
Gets contexts.- Returns:
- the contexts
-
push
public void push()Puts a new Map on the top of the stack -
push
Puts an existing Map on the top of the stack (top meaning will override lower layers on the stack) -
pop
Remove and returns the Map from the top of the stack; if there is only one Map on the stack it returns null and does not remove it -
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
get
-
get
- Specified by:
get
in interfaceLocalizedMap<K>
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
toString
-