Class MapContext<K,V>
- java.lang.Object
-
- org.apache.ofbiz.base.util.collections.MapContext<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,V>
,LocalizedMap<V>
- Direct Known Subclasses:
MapStack
,MultivaluedMapContext
public class MapContext<K,V> extends java.lang.Object implements java.util.Map<K,V>, LocalizedMap<V>
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.
-
-
Constructor Summary
Constructors Constructor Description MapContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToBottom(java.util.Map<K,V> existingMap)
Puts an existing Map on the BOTTOM of the stack (bottom meaning will be overriden by lower layers on the stack, ie everything else already there)void
clear()
boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
V
get(java.lang.Object key)
V
get(java.lang.String name, java.util.Locale locale)
boolean
isEmpty()
java.util.Set<K>
keySet()
java.util.Map<K,V>
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
push(java.util.Map<K,V> existingMap)
Puts an existing Map on the top of the stack (top meaning will override lower layers on the stack)V
put(K key, V value)
void
putAll(java.util.Map<? extends K,? extends V> arg0)
V
remove(java.lang.Object key)
int
size()
java.lang.String
toString()
java.util.Collection<V>
values()
-
-
-
Method Detail
-
push
public void push()
Puts a new Map on the top of the stack
-
push
public void push(java.util.Map<K,V> existingMap)
Puts an existing Map on the top of the stack (top meaning will override lower layers on the stack)
-
addToBottom
public void addToBottom(java.util.Map<K,V> existingMap)
Puts an existing Map on the BOTTOM of the stack (bottom meaning will be overriden by lower layers on the stack, ie everything else already there)
-
pop
public java.util.Map<K,V> 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
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
get
public V get(java.lang.String name, java.util.Locale locale)
- Specified by:
get
in interfaceLocalizedMap<K>
-
values
public java.util.Collection<V> values()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-