Class ExpressionParser

java.lang.Object
com.realtime.crossfire.jxclient.skin.io.ExpressionParser

public class ExpressionParser extends Object
Parser for integer expressions.
  • Method Details

    • parseInt

      public static int parseInt(@NotNull @NotNull String str) throws IOException
      Parses an integer constant. Valid constants are "3", "3+4", and "1+2-3+4".
      Parameters:
      str - the integer constant string to parse
      Returns:
      the integer value
      Throws:
      IOException - if a parsing error occurs
    • parseExpression

      @NotNull public static @NotNull Expression parseExpression(@NotNull @NotNull String str) throws IOException
      Parses an integer constant. Valid constants are "3", "3+4", and "1+2-3+4".
      Parameters:
      str - the integer constant string to parse
      Returns:
      the integer expression
      Throws:
      IOException - if a parsing error occurs