org.extex.interpreter.primitives.register.pair
Class NumberedPair
java.lang.Object
org.extex.interpreter.type.AbstractCode
org.extex.interpreter.type.AbstractAssignment
org.extex.interpreter.primitives.register.pair.NamedPair
org.extex.interpreter.primitives.register.pair.NumberedPair
- All Implemented Interfaces:
- java.io.Serializable, PairConvertible, Code, Theable
public class NumberedPair
- extends NamedPair
This class provides an implementation for the primitive \pair.
It sets the named pair register to the value given, and as a side effect all
prefixes are zeroed.
All features are inherited from
pair. Just
the key has to be provided under which this Pair has to be stored. This key
is constructed from the name, a hash mark and the running number.
Example
\pair12=345.67 11.23
- Version:
- $Revision: 6447 $
- Author:
- Michael Niedermair
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NumberedPair
public NumberedPair(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 number) for the register.
- Overrides:
getKey in class NamedPair
- Parameters:
context - the contextsource - the sourcetypesetter - the typesetter
- Returns:
- the key
- Throws:
HelpingException - in case of an error.
TypesetterException - in case of an error in the typesetter- See Also:
NamedPair.getKey(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, Typesetter)