@ CheckForNull private static Double valueAsDouble ( Measure measure ) { switch ( measure . getValueType ( ) ) { case BOOLEAN : return measure . getBooleanValue ( ) ? 1.0d : 0.0d ; case INT : return ( double ) measure . getIntValue ( ) ; case LONG : return ( double ) measure . getLongValue ( ) ; case DOUBLE : return measure . getDoubleValue ( ) ; case NO_VALUE : case STRING : case LEVEL : default : return null ; } }
return the numerical value as a double . It s the type used in db . Returns null if no numerical value found