public int getValue ( String str ) { str = sanitize ( str ) ; Integer value = ( Integer ) strings . get ( str ) ; if ( value != null ) { return value . intValue ( ) ; } if ( prefix != null ) { if ( str . startsWith ( prefix ) ) { int val = parseNumeric ( str . substring ( prefix . length ( ) ) ) ; if ( val >= 0 ) { return val ; } } } if ( numericok ) { return parseNumeric ( str ) ; } return - 1 ; }
Gets the numeric value corresponding to a text mnemonic .