edu.mssm.crover.domain2d
Class RExpression
java.lang.Object
|
+--edu.mssm.crover.domain2d.RExpression
- Direct Known Subclasses:
- RAdd, RConstAdaptor, RConstant, REqual, RGE, RSub, RVariable
- public abstract class RExpression
- extends java.lang.Object
Reflex expression.
This abstract class represents simple arithmetic expressions
required to constrain the layout of the SSE. An expression
can be observed by other RExpressions. The observers are
asked to accept or reject any change that the RExpression
can go through its life, via calls to setValue().
The exception RInvalidChange is thrown whenever a single of
the observer declares the change cannot be done (this can happen
when an inequality constraint has been built out of RGE, a
constant and a RExpression).
If no RInvalidChange is thrown, the call to setValue() succeeds
and the value is accepted. The method check() is the mechanism
by which changes to an RExpression are repercuted among the
constrain relationship.
This Constraining scheme is really simple and is not recommended
for complex projects. It has the advantages of being fast and
sufficient for the needs of the domain2d package.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
main
public RExpression main
epsilon
protected final double epsilon
- Precision of the equality comparison between doubles.
- See Also:
- Constant Field Values
RExpression
public RExpression(RExpression e)
RExpression
public RExpression()
getValue
public abstract double getValue()
setValue
public abstract void setValue(double v)
throws RInvalidChange
RInvalidChange
add
public void add(RExpression increment)
register
public void register(RExpression observer)
dispose
public void dispose()
- Dispose of this RExpression. Release the references
on the observers so that they can be garbage collected.
register
public void register(java.util.Set observers)
getObservers
public java.util.Set getObservers()
check
public void check()
throws RInvalidChange
RInvalidChange
Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.