|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jwo.utils.expression.MathToken
public final class MathToken
Stores an enumerated list of tokens that may be parsed by
the MathParser. Includes arithmetical, trig operators, variable
substitution, control statements and parenthases. Fields starting with LEX_
indicate the textual representation of the token and fields starting
with TOK_
indicate the token itself.
Based on original code described at
www.devx.com/premier/mgznarch/javapro/2001/05may01/ps0105/ps0105.asp.
Field Summary | |
---|---|
static String |
LEX_ABS
Text representing absolute function. |
static String |
LEX_ACOS
Text representing trigonometrical inverse cosine function. |
static String |
LEX_ADD
Text representing addition operator. |
static String |
LEX_AND
Text representing Boolean 'and' operator. |
static String |
LEX_ASIN
Text representing trigonometrical inverse sine function. |
static String |
LEX_ATAN
Text representing trigonometrical inverse tangent (semicircular angle +-pi/2) function. |
static String |
LEX_ATAN2
Text representing trigonometrical inverse tangent (full circular +-pi) function. |
static String |
LEX_BLUE
Text representing blue colour component extraction function. |
static String |
LEX_CLOSE_INDEX
Close index text representation. |
static String |
LEX_CLOSE_PAREN
Close parenthesis text representation. |
static String |
LEX_COMPARE
Text representing string compare function. |
static String |
LEX_CONCATENATE
Text representing string concatenation operator. |
static String |
LEX_COS
Text representing trigonometrical cosine function. |
static String |
LEX_DIVIDE
Text representing division operator. |
static String |
LEX_E
Text representing constant e. |
static String |
LEX_EQUAL
Text representing 'equal to' operator. |
static String |
LEX_EXPONENT
Text representing exponential (power) operator. |
static String |
LEX_FOCAL
Text representing focal operator. |
static String |
LEX_GAUSS
Text representing Gaussian (normal) function. |
static String |
LEX_GREATER_THAN
Text representing 'greater than' operator. |
static String |
LEX_GREATER_THAN_EQUAL
Text representing 'greater than or equal to' operator. |
static String |
LEX_GREEN
Text representing green colour component extraction function. |
static String |
LEX_IF
Text representing logical 'if' construction. |
static String |
LEX_IFELSE
Text representing logical 'ifelse' function (conditional operator). |
static String |
LEX_LESS_THAN
Text representing 'less than' operator. |
static String |
LEX_LESS_THAN_EQUAL
Text representing 'less than or equal to' operator. |
static String |
LEX_LN
Text representing natural logarithm function. |
static String |
LEX_MAX
Text representing maximum function. |
static String |
LEX_MEDIAN
Text representing median function. |
static String |
LEX_MIN
Text representing minimum function. |
static String |
LEX_MODE
Text representing mode function. |
static String |
LEX_MODULUS
Text representing modulus operator. |
static String |
LEX_MULTIPLY
Text representing multiplication operator. |
static String |
LEX_NOT
Text representing Boolean 'not' operator. |
static String |
LEX_NOT_EQUAL
Text representing 'not equal to' operator. |
static String |
LEX_NULL
Text representing null identifier. |
static String |
LEX_OPEN_INDEX
Open index text representation. |
static String |
LEX_OPEN_PAREN
Open parenthesis text representation. |
static String |
LEX_OR
Text representing Boolean 'or' operator. |
static String |
LEX_PERCENTILE
Text representing percentile function. |
static String |
LEX_PI
Text representing constant pi. |
static String |
LEX_QUOTE
Quotation mark text representation. |
static String |
LEX_QUOTEFN
Text representing the string quote function. |
static String |
LEX_RAND
Text representing rectangular random function. |
static String |
LEX_RANK
Text representing ranking function. |
static String |
LEX_RED
Text representing red colour component extraction function. |
static String |
LEX_RGB
Text representing colour creation function. |
static String |
LEX_ROUND
Text representing decimal rounding function. |
static String |
LEX_SEPARATOR
Parameter separator symbol. |
static String |
LEX_SIN
Text representing trigonometrical sine function. |
static String |
LEX_SQRT
Text representing square root function. |
static String |
LEX_STRLEN
Text representing the string length function. |
static String |
LEX_SUBSTRING
Text representing the substring function. |
static String |
LEX_SUBTRACT
Text representing subtraction operator. |
static String |
LEX_TAN
Text representing trigonometrical tangent function. |
static String |
LEX_WHILE
Text representing logical 'while loop' construction. |
static String |
LEX_X
Text representing x variable. |
static String |
LEX_Y
Text representing y variable. |
static String |
LEX_Z1
Text representing z1 variable. |
static String |
LEX_Z2
Text representing z2 variable. |
static MathToken |
TOK_ADDITIVE
Additive operator token. |
static MathToken |
TOK_BOOLEAN
Boolean type token. |
static MathToken |
TOK_CLOSE_INDEX
Close index token. |
static MathToken |
TOK_CLOSE_PAREN
Close parenthesis token. |
static MathToken |
TOK_COMPARATIVE
Comparative operator token. |
static MathToken |
TOK_EXPONENT
Exponential operator token. |
static MathToken |
TOK_FUNC
Fixed parameter function token. |
static MathToken |
TOK_MULTIPLICATIVE
Multiplicative operator token. |
static MathToken |
TOK_NUMBER
Numerical token. |
static MathToken |
TOK_OPEN_INDEX
Open index token. |
static MathToken |
TOK_OPEN_PAREN
Open parenthesis token. |
static MathToken |
TOK_QUOTED_STRING
Any text inside quotation marks. |
static MathToken |
TOK_SEPARATOR
Parameter separator token. |
static MathToken |
TOK_USER_FUNC
User-defined function token. |
static MathToken |
TOK_VAR_FUNC
Variable parameter function token. |
static MathToken |
TOK_VARIABLE
Variable token. |
static Object[][] |
TOKENS
Array of valid regular expressions corresponding with their token types. |
Constructor Summary | |
---|---|
MathToken()
|
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String LEX_ADD
public static final String LEX_SUBTRACT
public static final String LEX_MULTIPLY
public static final String LEX_DIVIDE
public static final String LEX_MODULUS
public static final String LEX_EXPONENT
public static final String LEX_CONCATENATE
public static final String LEX_GREATER_THAN
public static final String LEX_LESS_THAN
public static final String LEX_GREATER_THAN_EQUAL
public static final String LEX_LESS_THAN_EQUAL
public static final String LEX_EQUAL
public static final String LEX_NOT_EQUAL
public static final String LEX_AND
public static final String LEX_OR
public static final String LEX_NOT
public static final String LEX_SIN
public static final String LEX_COS
public static final String LEX_TAN
public static final String LEX_ASIN
public static final String LEX_ACOS
public static final String LEX_ATAN
public static final String LEX_ATAN2
public static final String LEX_COMPARE
public static final String LEX_SQRT
public static final String LEX_LN
public static final String LEX_MAX
public static final String LEX_MIN
public static final String LEX_MODE
public static final String LEX_MEDIAN
public static final String LEX_PERCENTILE
public static final String LEX_RANK
public static final String LEX_ROUND
public static final String LEX_ABS
public static final String LEX_IFELSE
public static final String LEX_IF
public static final String LEX_WHILE
public static final String LEX_QUOTEFN
public static final String LEX_RED
public static final String LEX_GREEN
public static final String LEX_BLUE
public static final String LEX_RGB
public static final String LEX_SUBSTRING
public static final String LEX_STRLEN
public static final String LEX_Z1
public static final String LEX_Z2
public static final String LEX_X
public static final String LEX_Y
public static final String LEX_NULL
public static final String LEX_PI
public static final String LEX_E
public static final String LEX_RAND
public static final String LEX_GAUSS
public static final String LEX_FOCAL
public static final String LEX_OPEN_PAREN
public static final String LEX_CLOSE_PAREN
public static final String LEX_QUOTE
public static final String LEX_OPEN_INDEX
public static final String LEX_CLOSE_INDEX
public static final String LEX_SEPARATOR
public static final MathToken TOK_OPEN_PAREN
public static final MathToken TOK_CLOSE_PAREN
public static final MathToken TOK_OPEN_INDEX
public static final MathToken TOK_CLOSE_INDEX
public static final MathToken TOK_QUOTED_STRING
public static final MathToken TOK_ADDITIVE
public static final MathToken TOK_COMPARATIVE
public static final MathToken TOK_BOOLEAN
public static final MathToken TOK_MULTIPLICATIVE
public static final MathToken TOK_EXPONENT
public static final MathToken TOK_NUMBER
public static final MathToken TOK_FUNC
public static final MathToken TOK_VAR_FUNC
public static final MathToken TOK_USER_FUNC
public static final MathToken TOK_VARIABLE
public static final MathToken TOK_SEPARATOR
public static final Object[][] TOKENS
MathToken
that is associated
with the regular expression. For example TOKENS[0]
might be
the regular expression [-+]
and TOKENS[1] would
be TOK_ADDITIVE
. There is no guarantee of the order of elements
in this array other than all valid token types are included, and a regular
expression is always followed by a single MathToken
.
Constructor Detail |
---|
public MathToken()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |