public static BigDecimal getBigDecimal(final String numberString)
throws ApplicationException {
if (numberString == null) {
return null;
}
try {
return new BigDecimal(numberString);
} catch (NumberFormatException e) {
Logger logger = DefaultLogger
.getInstance(MyConvertToNumber.class);
logger.error("message", e);
throw new ApplicationException("message", e);
}
}public static Integer getInteger(final String numberString)
throws ApplicationException {
if (numberString == null) {
return null;
}
try {
return new Integer(numberString);
} catch (NumberFormatException e) {
Logger logger = DefaultLogger
.getInstance(MyConvertToNumber.class);
logger.error("message", e);
throw new ApplicationException("message", e);
}
}
Friday, October 5, 2007
Java > Convert Number
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment