@ Override public Object convert ( String value ) { if ( value == null || value . isEmpty ( ) ) { return value ; } Object result = Ints . tryParse ( value ) ; if ( result != null ) { return result ; } result = Longs . tryParse ( value ) ; if ( result != null ) { return result ; } result = Doubles . tryParse ( value ) ; if ( result != null ) { return result ; } return value ; }
Attempts to convert the provided string value to a numeric type trying Integer Long and Double in order until successful .