inria.meije.rc.sugarcubes
Class JavaBooleanValue

java.lang.Object
  |
  +--inria.meije.rc.sugarcubes.JavaBooleanValue
All Implemented Interfaces:
JavaBooleanExpression, JavaExpression, java.io.Serializable

public final class JavaBooleanValue
extends java.lang.Object
implements JavaBooleanExpression

Simple implementation of a JavaBooleanExpression used when no computation at runtime is required. It is typically used for debugging to force the choice of a particular branch in an If instruction.@see inria.meije.rc.sugarcubes.SC#If

See Also:
Serialized Form

Field Summary
protected  boolean b
          The constant boolean value which is set at construction time.
 
Constructor Summary
JavaBooleanValue(boolean b)
          The constructor of this class gets a boolean value and stores it for future use (when the evaluate method is called).
 
Method Summary
 boolean evaluate(java.lang.Object self, LocalVariables vars, ReactiveEngine engine)
          Returns the boolean value.
 java.lang.String toString()
          Returns a string representation of that atomic expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

b

protected final boolean b
The constant boolean value which is set at construction time.
Constructor Detail

JavaBooleanValue

public JavaBooleanValue(boolean b)
The constructor of this class gets a boolean value and stores it for future use (when the evaluate method is called).
Method Detail

evaluate

public final boolean evaluate(java.lang.Object self,
                              LocalVariables vars,
                              ReactiveEngine engine)
Returns the boolean value.
Specified by:
evaluate in interface JavaBooleanExpression

toString

public final java.lang.String toString()
Returns a string representation of that atomic expression. (simplify debugging)
Overrides:
toString in class java.lang.Object