Package org.spiderwiz.zutils
Class ZDictionary
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,String>
public class ZDictionary extends ZHashMap<String,String>
Equivalent of
ZHashMap<String,String>
with some utility methods.- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
Constructor Summary
Constructors Constructor Description ZDictionary()
Constructs an empty ZDictionary with the default initial capacity and the default load factor.ZDictionary(Map<String,String> m)
Constructs a new ZDictionary with the same mappings as the specified Map. -
Method Summary
Modifier and Type Method Description static ZDictionary
parseParameterList(String parList)
Gets a parameter list string and returns a dictionary object that maps keys to values.Methods inherited from class org.spiderwiz.zutils.ZHashMap
clear, computeIfAbsent, containsKey, forEach, get, lockRead, lockWrite, put, putAll, putIfAbsent, putIfAbsentReturnNew, remove, removeAll, removeIf, size, unlockRead, unlockWrite
Methods inherited from class java.util.HashMap
clone, compute, computeIfPresent, containsValue, entrySet, getOrDefault, isEmpty, keySet, merge, remove, replace, replace, replaceAll, values
-
Constructor Details
-
ZDictionary
public ZDictionary()Constructs an empty ZDictionary with the default initial capacity and the default load factor. -
ZDictionary
Constructs a new ZDictionary with the same mappings as the specified Map.- Parameters:
m
- the specified map.
-
-
Method Details
-
parseParameterList
Gets a parameter list string and returns a dictionary object that maps keys to values.The parameter is a list of pairs key=value concatenated by a semicolon (;). The assignment is optional. The list may contain keys that are not assigned to values, in which case the returned dictionary maps the keys to
null
.- Parameters:
parList
- parameter list in the format "key1=value1;key2=value2;..."- Returns:
- a dictionary object that maps keys (converted to lowercase) to values.
-