private static Object convertStringToAppropriateNumber ( String value ) { if ( value . contains ( "." ) ) { return Double . valueOf ( value ) ; } else { return Long . valueOf ( value ) ; } }
We need to support Strings as some information that user might need to deal with is inherently stored in String variables - for example header values or CSV files .