|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.scanner.type.token.AbstractToken
public abstract class AbstractToken
This is the abstract base class for all Tokens.
| Field Summary | |
|---|---|
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for serialization. |
| Constructor Summary | |
|---|---|
protected |
AbstractToken(UnicodeChar uc)
Creates a new object for a Unicode character. |
| Method Summary | |
|---|---|
boolean |
eq(Catcode cc,
char c)
Compare the current token with a pair of catcode and character value. |
boolean |
eq(Catcode cc,
java.lang.String s)
Compare the current token with a pair of catcode and String value. |
boolean |
eq(char c)
Compare the current token with a character value. |
boolean |
equals(java.lang.Object t)
Indicates whether some other object is "equal to" this one. |
abstract Catcode |
getCatcode()
Getter for the catcode. |
UnicodeChar |
getChar()
Getter for the value. |
protected Localizer |
getLocalizer()
Getter for localizer. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isa(Catcode cc)
Check if the current token has a specified catcode. |
java.lang.String |
toString()
Return the printable representation of this object. |
java.lang.String |
toText()
Return the text representation of this object. |
java.lang.String |
toText(UnicodeChar esc)
Return the printable representation of this token as it can be read back in. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.extex.scanner.type.token.Token |
|---|
toString, toString, visit |
| Field Detail |
|---|
protected static final long serialVersionUID
| Constructor Detail |
|---|
protected AbstractToken(UnicodeChar uc)
uc - the value of the token| Method Detail |
|---|
public boolean eq(Catcode cc,
char c)
eq in interface Tokencc - the catcodec - the value
true iff the tokens are equalToken.eq(
org.extex.scanner.type.Catcode, char)
public boolean eq(Catcode cc,
java.lang.String s)
eq in interface Tokencc - the catcodes - the value
true iff the tokens are equalToken.eq(
org.extex.scanner.type.Catcode, java.lang.String)public boolean eq(char c)
eq in interface Tokenc - the value
true iff the tokens are equalToken.eq(char)public boolean equals(java.lang.Object t)
equals in interface Tokenequals in class java.lang.Objectt - the reference token with which to compare.
true if this object is the same as the obj
argument; false otherwise.Object.equals(java.lang.Object)public abstract Catcode getCatcode()
getCatcode in interface TokenToken.getCatcode()public final UnicodeChar getChar()
getChar in interface TokenToken.getChar()protected Localizer getLocalizer()
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean isa(Catcode cc)
isa in interface Tokencc - the catcode to compare against
true iff the catcodes coincideToken.isa(
org.extex.scanner.type.Catcode)public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toText()
toText in interface Tokenpublic java.lang.String toText(UnicodeChar esc)
toText in interface Tokenesc - the escape character
Token.toText(
org.extex.core.UnicodeChar)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||