Package com.reportmill.base
Class RMMapUtils
java.lang.Object
com.reportmill.base.RMMapUtils
Utility methods for use with Java.util.Map.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ObjectanyElement(Map aMap) Returns any element from a map.static booleanReturns a key value interpreted as a boolean.static booleanReturns a key value interpreted as a boolean (with optional default value).static MapClones a map.static floatfloatValue(Map aMap, String aKey) Returns a key value interpreted as a float.static floatfloatValue(Map aMap, String aKey, float defaultValue) Returns a key value interpreted as a float (with optional default value).static ObjectReturns value for aKey in given map (accepts null map).static ObjectReturns value for aKey in given map with an optional default value for missing keys.static ObjectReturns the key for a given object in the given map.static ObjectgetKeyIdentical(Map aMap, Object aValue) Returns the key for a given identical object in the given map.static intReturns a key value interpreted as an int.static intReturns a key value interpreted as an int (with optional default value).static MapCreates a new map for given key and object.static voidAdds given key and value to given map (removes key if value is null).static MapputAllIfAbsent(Map m1, Map m2, boolean copyIfAbsent) Same as putAll, but only adds absent keys (option to copy if there are absent keys).static voidRenames a key in a map to a new key.static intReturns the size of given map (accepts null map).
- 
Constructor Details- 
RMMapUtilspublic RMMapUtils()
 
- 
- 
Method Details- 
newMapCreates a new map for given key and object.
- 
sizeReturns the size of given map (accepts null map).
- 
getReturns value for aKey in given map (accepts null map).
- 
getReturns value for aKey in given map with an optional default value for missing keys.
- 
putAdds given key and value to given map (removes key if value is null).
- 
renameRenames a key in a map to a new key.
- 
cloneClones a map.
- 
boolValueReturns a key value interpreted as a boolean.
- 
boolValueReturns a key value interpreted as a boolean (with optional default value).
- 
intValueReturns a key value interpreted as an int.
- 
intValueReturns a key value interpreted as an int (with optional default value).
- 
floatValueReturns a key value interpreted as a float.
- 
floatValueReturns a key value interpreted as a float (with optional default value).
- 
putAllIfAbsentSame as putAll, but only adds absent keys (option to copy if there are absent keys).
- 
getKeyReturns the key for a given object in the given map.
- 
getKeyIdenticalReturns the key for a given identical object in the given map.
- 
anyElementReturns any element from a map.
 
-