org.apache.myfaces.shared.util
Class SubKeyMap<V>
java.lang.Object
java.util.AbstractMap<String,V>
org.apache.myfaces.shared.util.SubKeyMap<V>
- All Implemented Interfaces:
- Map<String,V>
public final class SubKeyMap<V>
- extends AbstractMap<String,V>
NOTE: Class copied from trinidad to be used on FlashImpl.
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!
SubKeyMap
public SubKeyMap(Map<String,Object> base,
String prefix)
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Map<String,V>
- Overrides:
isEmpty
in class AbstractMap<String,V>
get
public V get(Object key)
- Specified by:
get
in interface Map<String,V>
- Overrides:
get
in class AbstractMap<String,V>
put
public V put(String key,
V value)
- Specified by:
put
in interface Map<String,V>
- Overrides:
put
in class AbstractMap<String,V>
remove
public V remove(Object key)
- Specified by:
remove
in interface Map<String,V>
- Overrides:
remove
in class AbstractMap<String,V>
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interface Map<String,V>
- Overrides:
containsKey
in class AbstractMap<String,V>
entrySet
public Set<Map.Entry<String,V>> entrySet()
- Specified by:
entrySet
in interface Map<String,V>
- Specified by:
entrySet
in class AbstractMap<String,V>
Copyright © 2015 The Apache Software Foundation. All rights reserved.