Class MapStack<K>

java.lang.Object
org.apache.ofbiz.base.util.collections.MapContext<K,Object>
org.apache.ofbiz.base.util.collections.MapStack<K>
All Implemented Interfaces:
Map<K,Object>, LocalizedMap<Object>

public class MapStack<K> extends MapContext<K,Object>
Map Stack
  • Constructor Details

    • MapStack

      protected MapStack()
  • Method Details

    • create

      public static <K> MapStack<K> create()
    • create

      public static <K> MapStack<K> create(Map<K,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 Object get(Object key)
      Specified by:
      get in interface Map<K,Object>
      Overrides:
      get in class MapContext<K,Object>
    • get

      public Object get(String name, Locale locale)
      Specified by:
      get in interface LocalizedMap<K>
      Overrides:
      get in class MapContext<K,Object>
    • put

      public Object put(K key, Object value)
      Specified by:
      put in interface Map<K,Object>
      Overrides:
      put in class MapContext<K,Object>