org.extex.scanner.type.token
Class MacroParamToken

java.lang.Object
  extended by org.extex.scanner.type.token.AbstractToken
      extended by org.extex.scanner.type.token.MacroParamToken
All Implemented Interfaces:
java.io.Serializable, Token

public class MacroParamToken
extends AbstractToken
implements Token

This class represents a macro parameter token.

This class has a protected constructor only. Use the factory TokenFactory to get an instance of this class.

Version:
$Revision: 4738 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Constructor Summary
protected MacroParamToken(UnicodeChar uc)
          Creates a new object.
 
Method Summary
 boolean equals(java.lang.Object t)
          Indicates whether some other object is "equal to" this one.
 Catcode getCatcode()
          Getter for the catcode.
 int hashCode()
          Returns a hash code value for the object.
 java.lang.String toString()
          Get the string representation of this object for debugging purposes.
 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 the text representation of this object.
 java.lang.Object visit(TokenVisitor visitor, java.lang.Object arg1)
          Invoke the appropriate visit method for the current class.
 
Methods inherited from class org.extex.scanner.type.token.AbstractToken
eq, eq, eq, getChar, getLocalizer, isa, toText
 
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
eq, eq, eq, getChar, isa, toText
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Constructor Detail

MacroParamToken

protected MacroParamToken(UnicodeChar uc)
Creates a new object.

Parameters:
uc - the actual value
Method Detail

equals

public boolean equals(java.lang.Object t)
Indicates whether some other object is "equal to" this one.

Specified by:
equals in interface Token
Overrides:
equals in class AbstractToken
Parameters:
t - the reference token with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
AbstractToken.equals(java.lang.Object)

getCatcode

public Catcode getCatcode()
Getter for the catcode.

Specified by:
getCatcode in interface Token
Specified by:
getCatcode in class AbstractToken
Returns:
the catcode
See Also:
Token.getCatcode()

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class AbstractToken
Returns:
a hash code value for this object
See Also:
AbstractToken.hashCode()

toString

public java.lang.String toString()
Get the string representation of this object for debugging purposes.

Overrides:
toString in class AbstractToken
Returns:
the string representation
See Also:
"TeX – The Program [298]"

toString

public void toString(java.lang.StringBuffer sb)
Print the token into a StringBuffer.

Specified by:
toString in interface Token
Parameters:
sb - the target string buffer
See Also:
Token.toString(java.lang.StringBuffer)

toString

public void toString(java.lang.StringBuilder sb)
Print the token into a StringBuilder.

Specified by:
toString in interface Token
Parameters:
sb - the target string builder
See Also:
Token.toString(java.lang.StringBuilder)

toText

public java.lang.String toText()
Return the text representation of this object.

Specified by:
toText in interface Token
Overrides:
toText in class AbstractToken
Returns:
the text representation

visit

public java.lang.Object visit(TokenVisitor visitor,
                              java.lang.Object arg1)
                       throws java.lang.Exception
Invoke the appropriate visit method for the current class.

Specified by:
visit in interface Token
Parameters:
visitor - the calling visitor
arg1 - the first argument to pass
Returns:
the result object
Throws:
java.lang.Exception - in case of an error
See Also:
Token.visit( org.extex.scanner.type.token.TokenVisitor, java.lang.Object)