Reuse functionality from StringUtils instead of duplicating code

This commit is contained in:
Benedikt Ritter 2015-07-24 13:07:12 +02:00
parent 5fb158cc05
commit f59a674a26
1 changed files with 1 additions and 9 deletions

View File

@ -1348,15 +1348,7 @@ public class NumberUtils {
* @return <code>true</code> if str contains only Unicode numeric
*/
public static boolean isDigits(final String str) {
if (StringUtils.isEmpty(str)) {
return false;
}
for (int i = 0; i < str.length(); i++) {
if (!Character.isDigit(str.charAt(i))) {
return false;
}
}
return true;
return StringUtils.isNumeric(str);
}
/**