org.extex.unit.tex.register.count
Class AbstractCount
java.lang.Object
org.extex.interpreter.type.AbstractCode
org.extex.interpreter.type.AbstractAssignment
org.extex.unit.tex.register.count.AbstractCount
- All Implemented Interfaces:
- java.io.Serializable, Code, InitializableCode
- Direct Known Subclasses:
- Countdef, CountPrimitive, Mag
public abstract class AbstractCount
- extends AbstractAssignment
- implements InitializableCode
This abstract base class provides the methods to compute the keys for
numbered count registers.
- Version:
- $Revision: 4770 $
- Author:
- Gerd Neugebauer
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractCount
public AbstractCount(CodeToken token)
- Creates a new object.
- Parameters:
token - the initial token for the primitive
getKey
protected java.lang.String getKey(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
- Return the key (the name of the primitive) for the numbered count
register.
- Parameters:
context - the interpreter context to usesource - the source for new tokenstypesetter - the typesetter
- Returns:
- the key for the current register
- Throws:
HelpingException - in case that a derived class need to throw an
Exception this one is declared.
TypesetterException - in case of an error in the typesetter
init
public void init(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
- Initialize the Code with some value coming from a String.
- Specified by:
init in interface InitializableCode
- Parameters:
context - the interpreter contextsource - the source of information for the initializationtypesetter - the typesetter
- Throws:
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter- See Also:
InitializableCode.init(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)