Top Description Fields Constructors Methods
uk.ac.ed.ph.snuggletex.tokens

public abstract Class Token

extends Object
Class Inheritance
Known Direct Subclasses
uk.ac.ed.ph.snuggletex.tokens.ArgumentContainerToken, uk.ac.ed.ph.snuggletex.tokens.FlowToken, uk.ac.ed.ph.snuggletex.tokens.RootToken
Imports
uk.ac.ed.ph.snuggletex.SnugglePackage, uk.ac.ed.ph.snuggletex.definitions.BuiltinCommand, .BuiltinEnvironment, .ComputedStyle, .LaTeXMode, .MathCharacter, uk.ac.ed.ph.snuggletex.internal.FrozenSlice, uk.ac.ed.ph.snuggletex.internal.util.DumpMode, .ObjectDumperOptions, .ObjectUtilities, uk.ac.ed.ph.snuggletex.semantics.Interpretation, .InterpretationType, .MathCharacterInterpretation, java.util.EnumMap

Base interface for a parsed SnuggleTeX token.
Author
David McKain
Version
$Revision$

Field Summary

Modifier and TypeField and Description
protected ComputedStyle
protected final EnumMap<InterpretationType, Interpretation>
interpretationMap

Interpretation(s) of this token, if it can be readily deduced from the input.

protected final LaTeXMode
latexMode

LaTeX Mode that this token was parsed in

protected final FrozenSlice
slice

Extent of this entire token

protected final TokenType
type

Classifies the token

Constructor Summary

AccessConstructor and Description
protected
Token(final FrozenSlice slice, final TokenType type, final LaTeXMode latexMode, final Interpretation... interpretations)

protected
Token(final FrozenSlice slice, final TokenType type, final LaTeXMode latexMode, final EnumMap<InterpretationType, Interpretation> interpretationMap)

Method Summary

Modifier and TypeMethod and Description
public ComputedStyle
public Interpretation
public EnumMap<InterpretationType, Interpretation>
public LaTeXMode
public MathCharacter
public int
public FrozenSlice
public TokenType
public boolean
public boolean
public boolean
public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

computedStyleback to summary
protected ComputedStyle computedStyle
interpretationMapback to summary
protected final EnumMap<InterpretationType, Interpretation> interpretationMap

Interpretation(s) of this token, if it can be readily deduced from the input. May be null.

latexModeback to summary
protected final LaTeXMode latexMode

LaTeX Mode that this token was parsed in

sliceback to summary
protected final FrozenSlice slice

Extent of this entire token

typeback to summary
protected final TokenType type

Classifies the token

Constructor Detail

Tokenback to summary
protected Token(final FrozenSlice slice, final TokenType type, final LaTeXMode latexMode, final Interpretation... interpretations)
Tokenback to summary
protected Token(final FrozenSlice slice, final TokenType type, final LaTeXMode latexMode, final EnumMap<InterpretationType, Interpretation> interpretationMap)

Method Detail

getComputedStyleback to summary
public ComputedStyle getComputedStyle()
getInterpretationback to summary
public Interpretation getInterpretation(InterpretationType type)
getInterpretationMapback to summary
public EnumMap<InterpretationType, Interpretation> getInterpretationMap()
Annotations
@ObjectDumperOptions:TO_STRING
getLatexModeback to summary
public LaTeXMode getLatexMode()
getMathCharacterback to summary
public MathCharacter getMathCharacter()
getMathCharacterCodePointback to summary
public int getMathCharacterCodePoint()
getSliceback to summary
public FrozenSlice getSlice()
Annotations
@ObjectDumperOptions:TO_STRING
getTypeback to summary
public TokenType getType()
hasInterpretationTypeback to summary
public boolean hasInterpretationType(InterpretationType... types)
isCommandback to summary
public boolean isCommand(BuiltinCommand command)
isEnvironmentback to summary
public boolean isEnvironment(BuiltinEnvironment environment)
setComputedStyleback to summary
public void setComputedStyle(ComputedStyle computedStyle)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override