Package org.apache.myfaces.util.lang
Class SubKeyMap<V>
Map that wraps another to provide an isolated namespace using
a prefix. This is especially handy for storing properties on
the session in a structured manner without putting them into
a true "Map" - because storing in a Map breaks session failover.
(Session failover won't trigger on mutations of contained objects.)
Note that there is a potential design flaw; if you create a SubKeyMap for "mypackage.foo" and for "mypackage.foo.bar", all the keys in the latter will actually show up in the former (prefixed by ".bar"). This "flaw" is actually relied on by PageFlowScopeMap (since it provides a handy way to clear out all descendents), so don't "fix" it!
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, keySet, putAll, size, toString, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
SubKeyMap
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
get
-
put
-
remove
-
containsKey
- Specified by:
containsKey
in interfaceMap<String,
V> - Overrides:
containsKey
in classAbstractMap<String,
V>
-
entrySet
-