public class StrTokenObject
extends java.lang.Object
History:
StripToken
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BAD_END_STR
delimiter string: should not be at the end of the string
|
static java.lang.String |
CONFLICT_STR
delimiter string: conflict list string for reomving character
|
static int |
NONE
token type: None
|
static int |
RESTORE_D
token type: delimiters will be kept while restoring
|
static java.lang.String |
RESTORE_D_STR
delimiter string: restore it after tokenizing
|
static int |
SPACE_D
token type: space token, such as " \t"
|
static java.lang.String |
SPACE_D_STR
delimiter string: space
|
static int |
STRIPABLE_D
token type: delimiters that will be striped if it's previous token type
is STRIPPED
|
static java.lang.String |
STRIPABLE_D_STR
delimiter string: can be stripped
|
static int |
STRIPPED
token type: token is stripped, won't be resotred while restoring
|
static int |
STRIPPING_D
token type: delimiters that strip previous chararcter if it's token
type is STRIPPED or in a conflict list
|
static java.lang.String |
STRIPPING_D_STR
delimiter string: strip out
|
static int |
TOKEN
token type: it is a token, not a delimiter
|
Constructor and Description |
---|
StrTokenObject(java.lang.String tokenStr,
int tokenType)
Creates a string token object, using token string and token type
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
GetTokenStr()
Get the token object in a String format
|
int |
GetTokenType()
Get the token type of this token object
|
void |
SetTokenType(int tokenType)
Set the token type of this string token object
|
public static final int NONE
public static final int TOKEN
public static final int SPACE_D
public static final int STRIPPED
public static final int RESTORE_D
public static final int STRIPPING_D
public static final int STRIPABLE_D
public static final java.lang.String SPACE_D_STR
public static final java.lang.String RESTORE_D_STR
public static final java.lang.String STRIPPING_D_STR
public static final java.lang.String STRIPABLE_D_STR
public static final java.lang.String CONFLICT_STR
public static final java.lang.String BAD_END_STR
public StrTokenObject(java.lang.String tokenStr, int tokenType)
tokenStr
- the token stringtokenType
- the type of tokenpublic void SetTokenType(int tokenType)
tokenType
- token typepublic int GetTokenType()
public java.lang.String GetTokenStr()