public static boolean isValidNumber(Integer number) {
methodName = "isValidNumber";
Logger logger = LoggingHelper.getLogger(LOGGER);
logger.entering (CLASS, methodName);
// parse this number. If you get an NFE, then its
// not valid, return false
try {
Integer.parseInt(number.toString());
} catch(Exception ex) {
logger.fine(methodName + " returns false");
logger.fine("Number Format Exception when parsing");
return false;
}
logger.fine(methodName + " returns true");
logger.exiting(CLASS, methodName);
return true;
}
methodName = "isValidNumber";
Logger logger = LoggingHelper.getLogger(LOGGER);
logger.entering (CLASS, methodName);
// parse this number. If you get an NFE, then its
// not valid, return false
try {
Integer.parseInt(number.toString());
} catch(Exception ex) {
logger.fine(methodName + " returns false");
logger.fine("Number Format Exception when parsing");
return false;
}
logger.fine(methodName + " returns true");
logger.exiting(CLASS, methodName);
return true;
}