public static Double getDouble(MetricsKeys key, StringMap map) { Double value = 0.0; if (map.containsKey(key.name()) && !map.get(key.name()).equals("")) { value = new Double(map.get(key.name())); } return value; }
public static Integer getInteger(MetricsKeys key, StringMap map) { Integer value = 0; if (map.containsKey(key.name()) && !map.get(key.name()).equals("")) { value = Integer.decode(map.get(key.name())); } return value; }
public static Long getLong(MetricsKeys key, StringMap map) { Long value = 0L; if (map.containsKey(key.name()) && !map.get(key.name()).equals("")) { value = Long.decode(map.get(key.name())); } return value; }
public static Boolean getBoolean(MetricsKeys key, StringMap map) { Boolean value = false; if (map.containsKey(key.name()) && !map.get(key.name()).equals("")) { value = Boolean.parseBoolean(map.get(key.name())); } return value; }
static void putInteger(MetricsKeys key, Integer value, StringMap map) { map.put(key.name(), value.toString()); }
static void putLong(MetricsKeys key, Long value, StringMap map) { map.put(key.name(), value.toString()); }
public static void putBoolean(MetricsKeys key, Boolean value, StringMap map) { map.put(key.name(), value.toString()); }
public static void putDouble(MetricsKeys key, Double value, StringMap map) { map.put(key.name(), value.toString()); }