diff --git a/src/main/java/org/apache/commons/lang3/math/NumberUtils.java b/src/main/java/org/apache/commons/lang3/math/NumberUtils.java index 5a4f4c8d1..2cbb975e5 100644 --- a/src/main/java/org/apache/commons/lang3/math/NumberUtils.java +++ b/src/main/java/org/apache/commons/lang3/math/NumberUtils.java @@ -1468,19 +1468,20 @@ public static boolean isNumber(final String str) { } /** - *

Checks whether the String is a parseable number.

+ *

Checks whether the given String is a parsable number.

* - *

Parseable numbers include those Strings understood by Integer.parseInt(String), - * Long.parseLong(String), Float.parseFloat(String) or - * Double.parseDouble(String).

+ *

Parsable numbers include those Strings understood by {@link Integer#parseInt(String)}, + * {@link Long#parseLong(String)}, {@link Float#parseFloat(String)} or + * {@link Double#parseDouble(String)}. This method can be used instead of catching {@link java.text.ParseException} + * when calling one of those methods.

* - *

Hexadecimal and scientific notations are not considered parseable. + *

Hexadecimal and scientific notations are not considered parsable. * See {@link #isNumber(String)} on those cases.

* - *

Null and empty String will return false.

+ *

{@code Null} and empty String will return false.

* - * @param str the String to check. - * @return true if the string is a parseable number. + * @param str the String to check. + * @return {@code true} if the string is a parsable number. * @since 3.4 */ public static boolean isParsable(final String str) {