edu.mssm.crover.domain2d
Class RVariable

java.lang.Object
  |
  +--edu.mssm.crover.domain2d.RExpression
        |
        +--edu.mssm.crover.domain2d.RVariable

public class RVariable
extends RExpression

Stores a value that can be changed. The changes are controlled by the expressions in which this variable is involved. When setValue() is called with a new value for this variable, the observers' check methods are called in turn. If an RInvalidChange is thrown doing so the change is canceled and the previous value is reset. If not the new value is accepted. The observers are the RExpressions in which this variable is involved.


Field Summary
 
Fields inherited from class edu.mssm.crover.domain2d.RExpression
epsilon, main
 
Constructor Summary
RVariable(double value)
           
RVariable(double value, java.lang.String n)
           
 
Method Summary
 double getValue()
           
static void main(java.lang.String[] args)
           
 void setValue(double v)
           
 java.lang.String toString()
           
 
Methods inherited from class edu.mssm.crover.domain2d.RExpression
add, check, dispose, getObservers, register, register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RVariable

public RVariable(double value,
                 java.lang.String n)

RVariable

public RVariable(double value)
Method Detail

setValue

public void setValue(double v)
              throws RInvalidChange
Specified by:
setValue in class RExpression
RInvalidChange

getValue

public double getValue()
Specified by:
getValue in class RExpression

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.