Class StringKeyedMapAdapter<V>
java.lang.Object
org.springframework.binding.collection.StringKeyedMapAdapter<V>
- Direct Known Subclasses:
HttpServletContextMap,HttpServletRequestMap,HttpServletRequestParameterMap,HttpSessionMap
Base class for map adapters whose keys are String values. Concrete classes need only implement the abstract hook
methods defined by this class.
- Author:
- Keith Donald
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()protected abstract VgetAttribute(String key) Hook method that needs to be implemented by concrete subclasses.Hook method that needs to be implemented by concrete subclasses.booleanisEmpty()keySet()voidprotected abstract voidremoveAttribute(String key) Hook method that needs to be implemented by concrete subclasses.protected abstract voidsetAttribute(String key, V value) Hook method that needs to be implemented by concrete subclasses.intsize()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
StringKeyedMapAdapter
public StringKeyedMapAdapter()
-
-
Method Details
-
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,V>
-
entrySet
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-
getAttribute
Hook method that needs to be implemented by concrete subclasses. Gets a value associated with a key.- Parameters:
key- the key to lookup- Returns:
- the associated value, or null if none
-
setAttribute
Hook method that needs to be implemented by concrete subclasses. Puts a key-value pair in the map, overwriting any possible earlier value associated with the same key.- Parameters:
key- the key to associate the value withvalue- the value to associate with the key
-
removeAttribute
Hook method that needs to be implemented by concrete subclasses. Removes a key and its associated value from the map.- Parameters:
key- the key to remove
-
getAttributeNames
Hook method that needs to be implemented by concrete subclasses. Returns an enumeration listing all keys known to the map.- Returns:
- the key enumeration
-