org.jboss.jsfunit.context
Class NoNewEntryMap
java.lang.Object
org.jboss.jsfunit.context.NoNewEntryMap
- All Implemented Interfaces:
- Map
public class NoNewEntryMap
- extends Object
- implements Map
This Map copies all the entries of the wrapped Map into a new Map
and disallows new entries while JSFServerSession.getManagedBeanValue() is
running. The net effect is that any write-through capabilities
(or other special features) of the wrapped Map are disabled. Also,
put() will not create a new entry and will return null if the key does not exist.
See http://jira.jboss.org/jira/browse/JSFUNIT-164
- Since:
- 1.1
- Author:
- Stan Silvert
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
setELRunning
public void setELRunning(boolean isELRunning)
- JSFServerSession.getManagedBeanValue() calls this to disable creation
of a new managed bean during EL resolution.
- Parameters:
isELRunning
- Enable/disable creation of managed beans.
clear
public void clear()
- Specified by:
clear
in interface Map
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interface Map
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interface Map
entrySet
public Set entrySet()
- Specified by:
entrySet
in interface Map
get
public Object get(Object key)
- Specified by:
get
in interface Map
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Map
keySet
public Set keySet()
- Specified by:
keySet
in interface Map
put
public Object put(Object key,
Object value)
- This method does not allow new values to be placed into the Map. If
the Map does not already contain the key then it returns null. Otherwise,
it returns the value already held in the Map.
- Specified by:
put
in interface Map
- Parameters:
key
- The Map key.value
- The value that will be thrown away.
- Returns:
null
if the key does not already exist, otherwise
return the value already held in the Map.
putAll
public void putAll(Map m)
- Specified by:
putAll
in interface Map
remove
public Object remove(Object key)
- Specified by:
remove
in interface Map
size
public int size()
- Specified by:
size
in interface Map
values
public Collection values()
- Specified by:
values
in interface Map
Copyright © 2007-2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.