|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.math.AbstractTokenizer
lt.monarch.math.LogicalTokenizer
public class LogicalTokenizer extends AbstractTokenizer
Tokenizer for the logical expression (formula). Delimiters for this tokenizer are <, >, <=, >=, =, ==, !=, !, (, ), &&, ||, ##
## symbol corresponds to xor operator.
&& - and operator.
|| - or operator.
! - not operator.
< - less operator.
> - more operator.
| Modifier and Type | Field and Description |
|---|
| Fields inherited from class lt.monarch.math.AbstractTokenizer |
|---|
token |
| Constructor and Description |
|---|
LogicalTokenizer(java.lang.String formula)
Logical tokenizer constructor |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes the tokenizer |
protected void |
finalize()
|
int |
getPosition()
Returns the position of the tokenizer. |
java.lang.String |
getPreviousToken()
Return the previous token. |
boolean |
hasMoreTokens()
Checks if the string has more tokens |
boolean |
isExpression()
Checks if the token is numerical formula (not logical) |
boolean |
isNegation()
Checks if the last token is negation |
boolean |
isOperator()
Checks if current token is operator |
java.lang.String |
nextToken()
Returns next token |
| Methods inherited from class lt.monarch.math.AbstractTokenizer |
|---|
isLeftBracket, isRightBracket |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LogicalTokenizer(java.lang.String formula)
throws java.lang.Exception
formula - logical expression (formula)java.lang.Exception - throws exception if cannot tokenize the string| Method Detail |
|---|
public boolean hasMoreTokens()
AbstractTokenizer
hasMoreTokens in class AbstractTokenizerpublic java.lang.String nextToken()
AbstractTokenizer
nextToken in class AbstractTokenizerpublic int getPosition()
AbstractTokenizer
getPosition in class AbstractTokenizerpublic java.lang.String getPreviousToken()
AbstractTokenizer
getPreviousToken in class AbstractTokenizerpublic void dispose()
AbstractTokenizer
dispose in class AbstractTokenizerpublic boolean isExpression()
public boolean isOperator()
public boolean isNegation()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||