public class ExpressionTokenizer extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ESCAPE_CHARACTERS
The escape characters allow to include separators in the tokens.
|
Constructor and Description |
---|
ExpressionTokenizer(String string,
String separators,
String[] metas)
Create a new tokenizer.
|
ExpressionTokenizer(String string,
String separators,
String[] metas,
boolean retsep)
Create a new tokenizer.
|
Modifier and Type | Method and Description |
---|---|
int |
countTokens()
Count the number of tokens.
|
boolean |
hasMoreTokens()
Test if there are more tokens available.
|
static void |
main(String[] args)
Main for testing.
|
String |
nextToken()
Get the next token from the string.
|
String |
remainingTokens()
Get the remaining tokens as single string.
|
void |
setPosition(int pos)
Set the parse position manually.
|
public static final String ESCAPE_CHARACTERS
public ExpressionTokenizer(String string, String separators, String[] metas)
string
- The string.separators
- The separator chars.metas
- The nesting level delimiters.public String nextToken()
public String remainingTokens()
public boolean hasMoreTokens()
public int countTokens()
public void setPosition(int pos)
pos
- The new position.public static void main(String[] args)
Copyright © 2013. All Rights Reserved.