|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jett.parser.FormulaScanner
public class FormulaScanner
A FormulaScanner scans formula text and returns tokens.
| Nested Class Summary | |
|---|---|
static class |
FormulaScanner.Token
Enumeration for the different types of Tokens in Formulas. |
| Constructor Summary | |
|---|---|
FormulaScanner()
Construct a FormulaScanner object, with empty input. |
|
FormulaScanner(java.lang.String formulaText)
Construct a FormulaScanner object, with the given input. |
|
| Method Summary | |
|---|---|
java.lang.String |
getCurrLexeme()
Returns the current lexeme after a call to getNextToken. |
FormulaScanner.Token |
getNextToken()
Returns the Token. |
void |
reset()
Resets the scanner to the beginning of the formula text. |
void |
setFormulaText(java.lang.String formulaText)
Give the FormulaScanner another formula text to scan. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FormulaScanner()
FormulaScanner object, with empty input.
public FormulaScanner(java.lang.String formulaText)
FormulaScanner object, with the given input.
formulaText - The formula text to scan.| Method Detail |
|---|
public FormulaScanner.Token getNextToken()
Token. After this call completes, the current
lexeme is available via a call to getCurrLexeme.
Starts looking at the current offset, and once the token is found, then
the offset is advanced to the start of the next token.
- Returns:
- A
Token. - See Also:
getCurrLexeme()
public java.lang.String getCurrLexeme()
getNextToken.
null if
getNextToken hasn't been called yet after a reset.getNextToken(),
reset()public void reset()
public void setFormulaText(java.lang.String formulaText)
FormulaScanner another formula text to scan.
Resets to the beginning of the string.
formulaText - The formula text to scan.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||