|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openoffice.da.comp.w2lcommon.tex.tokenizer.Token
public class Token
This class represent a token in TeX
| Constructor Summary | |
|---|---|
Token()
Construct a new Token, initialized as a TokenTYPE.ENDINPUT-token |
|
| Method Summary | |
|---|---|
protected void |
addChar(char c)
Append a character to the character content of this token |
protected void |
clearChars()
Delete the character content of this token |
char |
getChar()
Get the first character in this token |
java.lang.String |
getString()
Get the character content of this token as a string |
TokenType |
getType()
Get the TokenType of this token |
boolean |
is(char c,
TokenType type)
Test wether this token is a character token of the given type (that is, a single character with a token type that is neither COMMAND_SEQUENCE nor ENDINPUT) |
boolean |
isCS(java.lang.String sName)
Test wether this token is a COMMAND_SEQUENCE token with a given name |
protected void |
set(char c,
TokenType type)
Set this token as a character token with a specific TokenType |
protected void |
setChar(char c)
Set the character content of this token to a single character (the type of the token is not changed) |
protected void |
setType(TokenType type)
Set the type of this token to a specific TokenType
(the character content is not changed) |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Token()
Token, initialized as a TokenTYPE.ENDINPUT-token
| Method Detail |
|---|
protected void setType(TokenType type)
TokenType
(the character content is not changed)
type - the new TokenTypeprotected void setChar(char c)
c - the character
protected void set(char c,
TokenType type)
TokenType
c - the charactertype - the TokenType to useprotected void clearChars()
protected void addChar(char c)
c - the character to be appended
public boolean is(char c,
TokenType type)
COMMAND_SEQUENCE nor ENDINPUT)
c - the character to testtype - the TokenType to test
public boolean isCS(java.lang.String sName)
COMMAND_SEQUENCE token with a given name
sName - the name of the command sequence
public TokenType getType()
TokenType of this token
public char getChar()
public java.lang.String getString()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||