Skip to content

NumberUtils

Fulminazzo edited this page Oct 2, 2023 · 1 revision

NumberUtils are a series of functions created to check whether a string can be converted to a number or not. We will look briefly into each one, but you will see how intuitive they are:

  • isNatural(String string): returns true if the given String represents a natural (>= 0) integer;
  • isInteger(String string): returns true if the given String represents an integer;
  • isNaturalLong(String string): returns true if the given String represents a natural (>= 0) long;
  • isLong(String string): returns true if the given String represents a long;
  • isDouble(String string): returns true if the given String represents a double;
  • isFloat(String string): returns true if the given String represents a float.