Class MapStack<K>
- java.lang.Object
-
- org.apache.ofbiz.base.util.collections.MapContext<K,java.lang.Object>
-
- org.apache.ofbiz.base.util.collections.MapStack<K>
-
- All Implemented Interfaces:
java.util.Map<K,java.lang.Object>
,LocalizedMap<java.lang.Object>
public class MapStack<K> extends MapContext<K,java.lang.Object>
Map Stack
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Fields inherited from class org.apache.ofbiz.base.util.collections.MapContext
contexts
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MapStack()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <K> MapStack<K>
create()
static <K> MapStack<K>
create(java.util.Map<K,java.lang.Object> baseMap)
static <K> MapStack<K>
create(MapStack<K> source)
Does a shallow copy of the internal stack of the passed MapStack; enables simultaneous stacks that share common parent Mapsjava.lang.Object
get(java.lang.Object key)
java.lang.Object
get(java.lang.String name, java.util.Locale locale)
java.lang.Object
put(K key, java.lang.Object value)
MapStack<K>
standAloneChildStack()
Creates a MapStack object that has the same Map objects on its stack, but with a new Map pushed on the top; meant to be used to enable a situation where a parent and child context are operating simultaneously using two different MapStack objects, but sharing the Maps in commonMapStack<K>
standAloneStack()
Creates a MapStack object that has the same Map objects on its stack; meant to be used to enable a situation where a parent and child context are operating simultaneously using two different MapStack objects, but sharing the Maps in common-
Methods inherited from class org.apache.ofbiz.base.util.collections.MapContext
addToBottom, clear, containsKey, containsValue, entrySet, isEmpty, keySet, pop, push, push, putAll, remove, size, toString, values
-
-
-
-
Method Detail
-
create
public static <K> MapStack<K> create()
-
create
public static <K> MapStack<K> create(java.util.Map<K,java.lang.Object> baseMap)
-
create
public static <K> MapStack<K> create(MapStack<K> source)
Does a shallow copy of the internal stack of the passed MapStack; enables simultaneous stacks that share common parent Maps
-
standAloneStack
public MapStack<K> standAloneStack()
Creates a MapStack object that has the same Map objects on its stack; meant to be used to enable a situation where a parent and child context are operating simultaneously using two different MapStack objects, but sharing the Maps in common
-
standAloneChildStack
public MapStack<K> standAloneChildStack()
Creates a MapStack object that has the same Map objects on its stack, but with a new Map pushed on the top; meant to be used to enable a situation where a parent and child context are operating simultaneously using two different MapStack objects, but sharing the Maps in common
-
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
get
in interfacejava.util.Map<K,java.lang.Object>
- Overrides:
get
in classMapContext<K,java.lang.Object>
-
get
public java.lang.Object get(java.lang.String name, java.util.Locale locale)
- Specified by:
get
in interfaceLocalizedMap<K>
- Overrides:
get
in classMapContext<K,java.lang.Object>
-
put
public java.lang.Object put(K key, java.lang.Object value)
- Specified by:
put
in interfacejava.util.Map<K,java.lang.Object>
- Overrides:
put
in classMapContext<K,java.lang.Object>
-
-