Possible Duplicate:
Safe String to BigDecimal conversion
Is there any ultimate parse function in java which can analyze type of the number given in string and return its value in object of class Number or similar.
I would like to convert string into bigDecimal or Number and put t into collection, sometimes I have string like 2.23
or 2,23
or 2
or BigInteger like 233242424242424242
.