de.dante.extex.interpreter.type.bool
Class Bool

java.lang.Object
  extended byde.dante.extex.interpreter.type.bool.Bool
All Implemented Interfaces:
java.io.Serializable

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

Bool

Version:
$Revision: 1.13 $
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)
          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 - init with a boolean-value

Bool

public Bool(Context context,
            TokenSource source)
     throws InterpreterException
Creates a new object. Scan the TokenSource for a Bool.

Parameters:
context - the context
source - the token source
Throws:
InterpreterException - 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 InterpreterException
Creates a new object. Possible values are true, false or on, off or !0, 0

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

setValue

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

Parameters:
b - the new value

getValue

public boolean getValue()
Getter for the value

Returns:
the value

not

public void not()
not


toString

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

Returns:
the value as String