Class NumberUtils

java.lang.Object
io.github.syst3ms.skriptparser.util.NumberUtils

public class NumberUtils extends Object
Utility functions for numbers that don't have to do with math.
  • Constructor Details

    • NumberUtils

      public NumberUtils()
  • Method Details

    • parseInt

      public static int parseInt(String str)
      Parse a string as an integer. Note that the parsed string is expected to be a parsable integer. Therefore it will only take care of overflow situations.
      Parameters:
      str - the string to parse
      Returns:
      the parsed integer
    • parseLong

      public static long parseLong(String str)
      Parse a string as a long. Note that the parsed string is expected to be a parsable long. Therefore it will only take care of overflow situations.
      Parameters:
      str - the string to parse
      Returns:
      the parsed integer