Package com.inductiveautomation.rm.base
Class RMMapUtils
java.lang.Object
com.inductiveautomation.rm.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 <K,V> boolean Returns a key value interpreted as a boolean.static <K,V> boolean Returns a key value interpreted as a boolean (with optional default value).static MapClones a map.static <K,V> float floatValue(Map<K, V> aMap, K aKey) Returns a key value interpreted as a float.static <K,V> float floatValue(Map<K, V> aMap, K aKey, float defaultValue) Returns a key value interpreted as a float (with optional default value).static <K,V> V Returns value for aKey in given map (accepts null map).static <K,V> V Returns 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 ObjectReturns the key for a given identical object in the given map.static <K,V> int Returns a key value interpreted as an int.static <K,V> int Returns a key value interpreted as an int (with optional default value).static MapCreates a new map with given args in key/value sequence.static MapCreates a new map for given key and object.static <K,V> V Adds 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 intReturns the size of given map (accepts null map).static StringtoStringSafe(Map aMap) Returns a string representation of map that doesn't recurse.
- 
Constructor Details- 
RMMapUtilspublic RMMapUtils()
 
- 
- 
Method Details- 
newMapCreates a new map for given key and object.
- 
newMapCreates a new map with given args in key/value sequence.
- 
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).
- 
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.
- 
getKeyIdReturns the key for a given identical object in the given map.
- 
anyElementReturns any element from a map.
- 
toStringSafeReturns a string representation of map that doesn't recurse.
 
-