@ Override protected String initValuesImpl ( final FieldCase c ) { double d = 0.0 ; String v = source . initValues ( c ) ; if ( v != null && v . length ( ) > 0 ) { d = 0.0 ; try { Number n = format . parse ( v ) ; d = n . doubleValue ( ) ; } catch ( ParseException e ) { log . debug ( "Could not parse string " + v + " to a number; setting value 0.0" ) ; } } d *= factor ; return format . format ( d ) ; }
Initializes the source constraint first . Then the source constraint s value is parsed with the format object of this constraint to a double number and this value is subsequently multiplied with the configurable factor . The multiplied value is finally formatted to a string using the the format object again and stored as a value .