/** * 验证参数是否为正数,是true * @param object * @return */ public final static boolean isInteger(Object object) { try { Pattern p = Pattern.compile("-?[0-9]+"); Matcher m = p.matcher(object.toString()); return m.matches(); } catch (Exception e) { return false; } }
验证参数是否为正数,是true
猜你喜欢
转载自blog.csdn.net/qq_38567039/article/details/80521206
今日推荐
周排行