return true;\r
}\r
\r
+ /**\r
+ Check if the input data is long int and it is in the valid scope\r
+ The scope is provided by String\r
+ \r
+ @param strNumber The input string which needs validation\r
+ @param BeginNumber The left boundary of the scope\r
+ @param EndNumber The right boundary of the scope\r
+ \r
+ @retval true - The input is Int and in the scope;\r
+ @retval false - The input is not Int or not in the scope\r
+ \r
+ **/\r
+ public static boolean isLongInt(String strNumber, long BeginNumber, long EndNumber) throws Exception{\r
+ //\r
+ //Check if the input data is int first\r
+ //\r
+ if (!isInt(strNumber)) {\r
+ return false;\r
+ }\r
+ //\r
+ //And then check if the data is between the scope\r
+ //\r
+ try {\r
+ Long intTemp = new Long(strNumber);\r
+ if ((intTemp.longValue() < BeginNumber) || (intTemp.longValue() > EndNumber)) {\r
+ return false;\r
+ }\r
+ }\r
+ catch (Exception e) {\r
+ throw e;\r
+ }\r
+ \r
+ return true;\r
+ }\r
/**\r
Check if the input data is int and it is in the valid scope\r
The scope is provided by String\r