|
|||||||||
| 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.FormulaTokenizer
public class FormulaTokenizer extends AbstractTokenizer
Formula tokenizer class, which splits the formula into tokens and helps to determine if the token is a number, operator, function, varibale or constant.
| Modifier and Type | Field and Description |
|---|
| Fields inherited from class lt.monarch.math.AbstractTokenizer |
|---|
token |
| Constructor and Description |
|---|
FormulaTokenizer(java.lang.String formula)
Formula 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 |
isConstant()
Checks if the last token is the constant. |
boolean |
isFunction()
Checks if the last token is the function. |
boolean |
isNumber()
Checks if the last token is the number. |
boolean |
isOperator()
Checks if the last token is the operator. |
boolean |
isVariable()
Checks if the token is the variable. |
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 FormulaTokenizer(java.lang.String formula)
formula - Formula string which has to be tokenized.| Method Detail |
|---|
public boolean hasMoreTokens()
AbstractTokenizer
hasMoreTokens in class AbstractTokenizerpublic java.lang.String nextToken()
AbstractTokenizer
nextToken in class AbstractTokenizerpublic boolean isOperator()
public boolean isNumber()
public boolean isFunction()
public boolean isConstant()
public boolean isVariable()
public java.lang.String getPreviousToken()
AbstractTokenizer
getPreviousToken in class AbstractTokenizerpublic int getPosition()
AbstractTokenizer
getPosition in class AbstractTokenizerpublic void dispose()
AbstractTokenizer
dispose in class AbstractTokenizer
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 | ||||||||