Class ExpressionParser
- java.lang.Object
-
- com.realtime.crossfire.jxclient.skin.io.ExpressionParser
-
public class ExpressionParser extends java.lang.ObjectParser for integer expressions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull ExpressionparseExpression(@NotNull java.lang.String str)Parses an integer constant.static intparseInt(@NotNull java.lang.String str)Parses an integer constant.
-
-
-
Method Detail
-
parseInt
public static int parseInt(@NotNull @NotNull java.lang.String str) throws java.io.IOExceptionParses 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:
java.io.IOException- if a parsing error occurs
-
parseExpression
@NotNull public static @NotNull Expression parseExpression(@NotNull @NotNull java.lang.String str) throws java.io.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:
java.io.IOException- if a parsing error occurs
-
-