de.dante.extex.interpreter
Class Conditional

java.lang.Object
  extended byde.dante.extex.interpreter.Conditional
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ConditionalSwitch

public class Conditional
extends java.lang.Object
implements java.io.Serializable

This class represents a conditional for a normal \if \else \fi construct. It records which \if has initiated it and where this has happened.

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

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Constructor Summary
Conditional(Locator locator, Code primitive, long branch, boolean neg)
          Creates a new object.
 
Method Summary
 long getBranch()
          Getter for branch.
 Locator getLocator()
          Getter for the locator of this conditional.
 Code getPrimitive()
          Getter for primitive.
 java.lang.String getPrimitiveName()
          Getter for the primitive which started this conditional.
 boolean getValue()
          Getter for the value of the conditional.
 boolean isNeg()
          Getter for neg.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

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

See Also:
Constant Field Values
Constructor Detail

Conditional

public Conditional(Locator locator,
                   Code primitive,
                   long branch,
                   boolean neg)
Creates a new object.

Parameters:
locator - the locator
primitive - the primitive which started this conditional
branch - true iff the then branch is taken
neg - indicator that the conditional has been negated
Method Detail

getBranch

public long getBranch()
Getter for branch.

Returns:
the branch

getLocator

public Locator getLocator()
Getter for the locator of this conditional. The locator points to the initiating \if.

Returns:
the locator

getPrimitive

public Code getPrimitive()
Getter for primitive.

Returns:
the primitive

getPrimitiveName

public java.lang.String getPrimitiveName()
Getter for the primitive which started this conditional.

Returns:
the primitive name

getValue

public boolean getValue()
Getter for the value of the conditional. If it has the value true then the conditional is one of the if-then-else constructs. Otherwise it is a \ifcase construction.

Returns:
the value

isNeg

public boolean isNeg()
Getter for neg.

Returns:
the neg

toString

public java.lang.String toString()
See Also:
Object.toString()