public class Utils extends Object
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static void |
convertStringAttributesToConstants(String sourceLabel,
Map<String,String> stringAttributes,
Map<String,Object> fetchResultConstants)
Converts constants stored in strings.properties to
org.opennms.netmgt.measurements.api.FetchResult
constants. |
static Double |
toDouble(Object o)
Attempts to cast an arbitrary object to a Double.
|
public static Double toDouble(Object o)
NullPointerException
- when o is nullNumberFormatException
- when the cast failspublic static void convertStringAttributesToConstants(String sourceLabel, Map<String,String> stringAttributes, Map<String,Object> fetchResultConstants)
org.opennms.netmgt.measurements.api.FetchResult
constants.
Keys are prefix with the source label in order to avoid collisions.
Values are converted to doubles when possible to allows the to be used by the ExpressionEngine
.Copyright © 2016. All rights reserved.