Skip to content

Commit

Permalink
add isInteger bec commons isNumeric doesn't allow negatives
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Aug 21, 2019
1 parent 8b305cc commit 8950e7c
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -462,4 +462,12 @@ public static String formatDateTimeISO(Date date) {
}
}

public static boolean isInteger(String s) {
try {
Long.parseLong(s);
return true;
} catch (NumberFormatException e) {
return false;
}
}
}

0 comments on commit 8950e7c

Please sign in to comment.