@Test public void isNumeric() throws Exception { assertThat(StringUtils.isNumeric("x")).isFalse(); assertThat(StringUtils.isNumeric("1")).isTrue(); }
public static boolean isNumeric(@NotNull String str) { for (char c : str.toCharArray()) { if (!Character.isDigit(c)) { return false; } } return true; }
StringUtils { public static boolean isNumeric(@NotNull String str) { for (char c : str.toCharArray()) { if (!Character.isDigit(c)) { return false; } } return true; } }
StringUtils { public static boolean isNumeric(@NotNull String str) { for (char c : str.toCharArray()) { if (!Character.isDigit(c)) { return false; } } return true; }  }
StringUtils { public static boolean isNumeric(@NotNull String str) { for (char c : str.toCharArray()) { if (!Character.isDigit(c)) { return false; } } return true; }  static boolean isNumeric(@NotNull String str); static String joinOn(String delimiter, @NotNull Object array[]); static String joinOn(String delimiter, @NotNull Collection<String> strings); static String joinOn(String delimiter, @NotNull String ... strings); static String joinOnSkipNullOrEmpty(String delimiter, @NotNull String ... strings); @NotNull static String nullToEmpty(@Nullable String value); @NotNull static String[] singletonArrayOrEmpty(@Nullable String value); @NotNull static String whitespace(int indent); @NotNull static String safeFormat(@NotNull String format, Object ... args); static boolean containsAny(@NotNull String value, @NotNull String chars); @NotNull static String firstAvailable(@NotNull String value, int n); static boolean startsWithAny(@NotNull String value, @NotNull String chars); }
StringUtils { public static boolean isNumeric(@NotNull String str) { for (char c : str.toCharArray()) { if (!Character.isDigit(c)) { return false; } } return true; }  static boolean isNumeric(@NotNull String str); static String joinOn(String delimiter, @NotNull Object array[]); static String joinOn(String delimiter, @NotNull Collection<String> strings); static String joinOn(String delimiter, @NotNull String ... strings); static String joinOnSkipNullOrEmpty(String delimiter, @NotNull String ... strings); @NotNull static String nullToEmpty(@Nullable String value); @NotNull static String[] singletonArrayOrEmpty(@Nullable String value); @NotNull static String whitespace(int indent); @NotNull static String safeFormat(@NotNull String format, Object ... args); static boolean containsAny(@NotNull String value, @NotNull String chars); @NotNull static String firstAvailable(@NotNull String value, int n); static boolean startsWithAny(@NotNull String value, @NotNull String chars);  }