Package groovyx.net.http
Class StringHashMap<V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<java.lang.Object,V>
-
- groovyx.net.http.StringHashMap<V>
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<java.lang.Object,V>
class StringHashMap<V> extends java.util.HashMap<java.lang.Object,V>
Converts keys to strings, mainly to normalize the difference between GString and String keys since a GString will not produce the same hashcode as its equivalent string. Basically, any given key will always be coerced to a String, and any retrieved key (either viaHashMap.keySet()
orHashMap.entrySet()
will always be a String.
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description StringHashMap()
StringHashMap(java.util.Map<?,? extends V> contents)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(java.lang.Object key)
V
get(java.lang.Object key)
V
put(java.lang.Object key, V value)
void
putAll(java.util.Map<?,? extends V> m)
V
remove(java.lang.Object key)
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StringHashMap
public StringHashMap()
-
StringHashMap
public StringHashMap(java.util.Map<?,? extends V> contents)
-
-