org.extex.unit.tex.conditional
Class Ifdim
java.lang.Object
org.extex.interpreter.type.AbstractCode
org.extex.unit.base.conditional.AbstractIf
org.extex.unit.tex.conditional.Ifdim
- All Implemented Interfaces:
- java.io.Serializable, Code, ExpandableCode, PrefixCode
public class Ifdim
- extends AbstractIf
This class provides an implementation for the primitive \ifdim.
The Primitive \ifdim
The primitive \ifdim provides a conditional which compares two
dimen values. The comparison for equality, greater, and less are possible.
Syntax
The formal description of this primitive is the following:
〈ifdim〉
→ \ifdim 〈dimen〉 〈op〉 〈dimen〉 〈true text〉 \fi
| \ifdim 〈dimen〉 〈op〉 〈dimen〉 〈true text〉 \else 〈false text〉 \fi
〈op〉
→ [<]
| [=]
| [>]
- Version:
- $Revision: 4439 $
- Author:
- Gerd Neugebauer
- See Also:
- Serialized Form
|
Field Summary |
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for
serialization. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
serialVersionUID
protected static final long serialVersionUID
- The constant serialVersionUID contains the id for
serialization.
- See Also:
- Constant Field Values
Ifdim
public Ifdim(CodeToken token)
- Creates a new object.
- Parameters:
token - the initial token for the primitive
conditional
public boolean conditional(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
- This method computes the boolean value of the conditional. If the result
is
true then the then branch is expanded and the else
branch is skipped. Otherwise the then branch is skipped and the else
branch is expanded.
- Specified by:
conditional in class AbstractIf
- Parameters:
context - the interpreter contextsource - the source for new tokenstypesetter - the typesetter
- Returns:
- the boolean value
- Throws:
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter- See Also:
AbstractIf.conditional(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)