예제 #1
0
 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;
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }
예제 #4
0
 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;
 }
예제 #5
0
 static void putInteger(MetricsKeys key, Integer value, StringMap map) {
   map.put(key.name(), value.toString());
 }
예제 #6
0
 static void putLong(MetricsKeys key, Long value, StringMap map) {
   map.put(key.name(), value.toString());
 }
예제 #7
0
 public static void putBoolean(MetricsKeys key, Boolean value, StringMap map) {
   map.put(key.name(), value.toString());
 }
예제 #8
0
 public static void putDouble(MetricsKeys key, Double value, StringMap map) {
   map.put(key.name(), value.toString());
 }