|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.scanner.type.tokens.Tokens
public class Tokens
This class is a container for a list of
Tokens.
| Field Summary | |
|---|---|
static Tokens |
EMPTY
This constant is the empty token register. |
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for serialization. |
| Constructor Summary | |
|---|---|
Tokens()
Creates a new object which does not contain any elements. |
|
Tokens(Token t)
Creates a new object. |
|
| Method Summary | |
|---|---|
void |
add(Token t)
Add another token to the end of the Tokens. |
void |
add(Tokens toks)
Add another token list to the end of the Tokens. |
void |
clear()
This method removes all elements from the tokens list. |
boolean |
equals(java.lang.Object object)
|
Token |
get(int i)
Get a specified token from the toks register. |
int |
hashCode()
Returns a hash code value for the object. |
void |
insert(int index,
Token t)
Add a token to the list at a certain position. |
java.util.Iterator<Token> |
iterator()
|
int |
length()
Getter for the length of the token register, this is the number of elements contained. |
Token |
pop()
Remove the first toke from the list and return it. |
void |
push(Token token)
Push a token to the front of the list. |
Token |
removeFirst()
Remove the last token from the list and return it. |
Token |
removeLast()
Remove the last token from the list and return it. |
void |
show(Tokens toks,
TokenFactory factory,
long esc)
Determine the printable representation of the object and append it to a list of Tokens. |
java.lang.String |
toString()
Return a String, which show all tokens in the list. |
void |
toString(java.lang.StringBuffer sb)
Print the token into a StringBuffer. |
void |
toString(java.lang.StringBuilder sb)
Print the token into a StringBuilder. |
java.lang.String |
toText()
Return a String, which shows all tokens (in text format) in the list. |
java.lang.String |
toText(UnicodeChar esc)
Return a String, which shows all tokens (in text format) in the list. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Tokens EMPTY
protected static final long serialVersionUID
| Constructor Detail |
|---|
public Tokens()
public Tokens(Token t)
t - the initial token| Method Detail |
|---|
public void add(Token t)
t - The token to addpublic void add(Tokens toks)
toks - the tokens to addpublic void clear()
public boolean equals(java.lang.Object object)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public Token get(int i)
get in interface FixedTokensi - the index for the token to get
null if i is out of
boundspublic int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()
public void insert(int index,
Token t)
index - the index to add the token tot - the token to addpublic java.util.Iterator<Token> iterator()
iterator in interface java.lang.Iterable<Token>Iterable.iterator()public int length()
length in interface FixedTokenspublic Token pop()
null if the list is emptypublic void push(Token token)
token - the token to pushpublic Token removeFirst()
null is returned.
nullpublic Token removeLast()
null is returned.
null
public void show(Tokens toks,
TokenFactory factory,
long esc)
throws CatcodeException
toks - the tokens to add tofactory - the token factoryesc - the escape character
CatcodeException - in case of an errorpublic java.lang.String toString()
toString in interface FixedTokenstoString in class java.lang.Objectpublic void toString(java.lang.StringBuilder sb)
sb - the target string builderpublic void toString(java.lang.StringBuffer sb)
sb - the target string bufferpublic java.lang.String toText()
toText in interface FixedTokensFixedTokens.toText()public java.lang.String toText(UnicodeChar esc)
toText in interface FixedTokensesc - the escape character to use
FixedTokens.toText(UnicodeChar)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||