org.extex.interpreter.primitives.register.bool
Class Bool

java.lang.Object
  extended by org.extex.interpreter.primitives.register.bool.Bool
All Implemented Interfaces:
java.io.Serializable

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

The register 'bool'.

Version:
$Revision: 7274 $
Author:
Michael Niedermair
See Also:
Serialized Form

Constructor Summary
Bool()
          Creates a new object.
Bool(boolean val)
          Creates a new object.
Bool(Context context, TokenSource source, Typesetter typesetter)
          Creates a new object.
Bool(long l)
          Creates a new object.
Bool(java.lang.String s)
          Creates a new object.
 
Method Summary
 boolean getValue()
          Getter for the value
 void not()
          not
 void setValue(boolean b)
          Setter for the value.
 java.lang.String toString()
          Return the value as String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Bool

public Bool()
Creates a new object.


Bool

public Bool(boolean val)
Creates a new object.

Parameters:
val - initial boolean value

Bool

public Bool(Context context,
            TokenSource source,
            Typesetter typesetter)
     throws HelpingException,
            ConfigurationException,
            TypesetterException
Creates a new object. Scan the TokenSource for a Bool.

Parameters:
context - the context
source - the token source
typesetter - the typesetter
Throws:
HelpingException - in case of an error.
ConfigurationException - in case if a configuration error
TypesetterException - in case of an error

Bool

public Bool(long l)
Creates a new object.

0 -> false

!= -> true

Parameters:
l - the value as long

Bool

public Bool(java.lang.String s)
     throws HelpingException
Creates a new object. Possible values are true, false or on, off or !0, 0

Parameters:
s - the value as String
Throws:
HelpingException - if no boolean-value are found
Method Detail

getValue

public boolean getValue()
Getter for the value

Returns:
the value

not

public void not()
not


setValue

public void setValue(boolean b)
Setter for the value.

Parameters:
b - the new value

toString

public java.lang.String toString()
Return the value as String

Overrides:
toString in class java.lang.Object
Returns:
the value as String