Package javax.servlet.jsp.el
Class ImplicitObjectELResolver.EnumeratedMap<K,V>
- java.lang.Object
-
- javax.servlet.jsp.el.ImplicitObjectELResolver.EnumeratedMap<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,V>
- Enclosing class:
- ImplicitObjectELResolver
private abstract static class ImplicitObjectELResolver.EnumeratedMap<K,V> extends java.lang.Object implements java.util.Map<K,V>This is a Map implementation driven by a data source that only provides an enumeration of keys and a getValue(key) method. This class must be subclassed to implement those methods.
Some of the methods may incur a performance penalty that involves enumerating the entire data source. In these cases, the Map will try to save the results of that enumeration, but only if the underlying data source is immutable.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateEnumeratedMap()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(java.lang.Object pKey)booleancontainsValue(java.lang.Object pValue)(package private) java.util.Map<K,V>convertToMap()Converts to a Mapjava.util.Set<java.util.Map.Entry<K,V>>entrySet()abstract java.util.Enumeration<K>enumerateKeys()Returns an enumeration of the keysVget(java.lang.Object pKey)java.util.Map<K,V>getAsMap()Converts the MapSource to a Map.abstract VgetValue(java.lang.Object pKey)Returns the value associated with the given key, or null if not found.booleanisEmpty()abstract booleanisMutable()Returns true if it is possible for this data source to changejava.util.Set<K>keySet()Vput(K pKey, V pValue)voidputAll(java.util.Map<? extends K,? extends V> pMap)Vremove(java.lang.Object pKey)intsize()java.util.Collection<V>values()
-
-
-
Method Detail
-
containsKey
public boolean containsKey(java.lang.Object pKey)
-
containsValue
public boolean containsValue(java.lang.Object pValue)
-
remove
public V remove(java.lang.Object pKey)
-
values
public java.util.Collection<V> values()
-
enumerateKeys
public abstract java.util.Enumeration<K> enumerateKeys()
Returns an enumeration of the keys
-
isMutable
public abstract boolean isMutable()
Returns true if it is possible for this data source to change
-
getValue
public abstract V getValue(java.lang.Object pKey)
Returns the value associated with the given key, or null if not found.
-
getAsMap
public java.util.Map<K,V> getAsMap()
Converts the MapSource to a Map. If the map is not mutable, this is cached
-
-