static boolean isNonNegativeInteger(String s) { return s != null && Pattern.matches("\\d+", s); }