@java.lang.SuppressWarnings("unchecked") public class ContextStack extends java.lang.Object implements java.util.Map
Constructor and description |
---|
ContextStack
() |
ContextStack
(boolean includeContext) |
Type Params | Return Type | Name and description |
---|---|---|
|
public void |
addRootMap(java.util.Map<java.lang.String, java.lang.Object> existingMap) Add an existing Map as the Root Map, ie on the BOTTOM of the stack meaning it will be overridden by other Maps on the stack |
|
public void |
clear() |
|
public ContextStack |
clone() Creates a ContextStack object that has the same Map objects on its stack (a shallow clone). |
|
public boolean |
containsKey(java.lang.Object key) |
|
public boolean |
containsValue(java.lang.Object value) |
|
public java.util.Set<Map.Entry<java.lang.String, java.lang.Object>> |
entrySet() |
|
public boolean |
equals(java.lang.Object o) |
|
public java.lang.Object |
get(java.lang.Object keyObj) |
|
public java.lang.Object |
getByString(java.lang.String key) |
|
public java.util.Map<java.lang.String, java.lang.Object> |
getCombinedMap() For faster access to multiple entries; do not write to this Map or use when any changes to ContextStack are possible |
|
public java.util.Map<java.lang.String, java.lang.Object> |
getRootMap() |
|
public java.util.Map<java.lang.String, java.lang.Object> |
getSharedMap() |
|
public int |
hashCode() |
|
public boolean |
isEmpty() |
|
public java.util.Set<java.lang.String> |
keySet() |
|
public java.util.Map<java.lang.String, java.lang.Object> |
pop() Remove and returns the Map from the top of the stack (the local context). |
|
public ContextStack |
popContext() Pop (restore) the entire context, ie the whole Map stack, undo isolated empty context and get the original one. |
|
public ContextStack |
push() Puts a new Map on the top of the stack for a fresh local context |
|
public ContextStack |
push(java.util.Map<java.lang.String, java.lang.Object> existingMap) Puts an existing Map on the top of the stack (top meaning will override lower layers on the stack) |
|
public ContextStack |
pushContext() Push (save) the entire context, ie the whole Map stack, to create an isolated empty context. |
|
public java.lang.Object |
put(java.lang.String key, java.lang.Object value) |
|
public void |
putAll(java.util.Map<? extends java.lang.String, ?> theMap) |
|
public java.lang.Object |
remove(java.lang.Object key) |
|
public int |
size() |
|
public java.lang.String |
toString() |
|
public java.util.Collection<java.lang.Object> |
values() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Add an existing Map as the Root Map, ie on the BOTTOM of the stack meaning it will be overridden by other Maps on the stack
existingMap
- An existing MapCreates a ContextStack object that has the same Map objects on its stack (a shallow clone). Meant to be used to enable a situation where a parent and child context are operating simultaneously using two different ContextStack objects, but sharing the Maps between them.
For faster access to multiple entries; do not write to this Map or use when any changes to ContextStack are possible
Remove and returns the Map from the top of the stack (the local context). If there is only one Map on the stack it returns null and does not remove it.
Pop (restore) the entire context, ie the whole Map stack, undo isolated empty context and get the original one.
Puts a new Map on the top of the stack for a fresh local context
Puts an existing Map on the top of the stack (top meaning will override lower layers on the stack)
existingMap
- An existing MapPush (save) the entire context, ie the whole Map stack, to create an isolated empty context.