question: public ArithmeticCondition ( String cond ) { String value ; int multiplier = 1 ; if ( cond . length ( ) < 2 ) { throw new SettingsError ( "Invalid condition \"" + cond + "\"" ) ; } operator = cond . charAt ( 0 ) ; value = cond . substring ( 1 ) ; if ( value . endsWith ( "k" ) ) { multiplier = 1000 ; } else if ( value . endsWith ( "M" ) ) { multiplier = 1000000 ; } if ( multiplier > 1 ) { value = value . substring ( 0 , value . length ( ) - 1 ) ; } if ( VALID_OPERATORS . indexOf ( operator ) == - 1 ) { throw new SettingsError ( "Invalid operator in condition \"" + cond + "\" valid operators: " + VALID_OPERATORS ) ; } try { number = Double . parseDouble ( value ) ; } catch ( NumberFormatException e ) { throw new SettingsError ( "Invalid numeric value in condition \"" + cond + "\"" ) ; } number *= multiplier ; }
target:  Creates a new condition based on the given string.