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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RVariable
public RVariable(double value,
java.lang.String n)
RVariable
public RVariable(double value)
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.