private static MetricValue number_to_metric_value_(Number elem){
  if (elem == null)   return MetricValue.EMPTY;
  final String num=elem.toString();
  try {
    return MetricValue.fromIntValue(Long.parseLong(num));
  }
 catch (  NumberFormatException ex) {
  }
  try {
    return MetricValue.fromDblValue(Double.parseDouble(num));
  }
 catch (  NumberFormatException ex) {
  }
  return MetricValue.fromStrValue(num);
}

private static MetricValue number_to_metric_value_ ( Number elem ) { if ( elem == null ) return MetricValue . EMPTY ; final String num = elem . toString ( ) ; try { return MetricValue . fromIntValue ( Long . parseLong ( num ) ) ; } catch ( NumberFormatException ex ) { } try { return MetricValue . fromDblValue ( Double . parseDouble ( num ) ) ; } catch ( NumberFormatException ex ) { } return MetricValue . fromStrValue ( num ) ; }
work around for google gson parser emitting numbers as ' lazily parsed ' numbers .
