- Direct Known Subclasses:
- RAdd, RConstAdaptor, RConstant, REqual, RGE, RSub, RVariable
- public abstract class RExpression
- extends java.lang.Object
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
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
public RExpression main
protected final double epsilon
- Precision of the equality comparison between doubles.
- See Also:
- Constant Field Values
public RExpression(RExpression e)
public abstract double getValue()
public abstract void setValue(double v)
public void add(RExpression increment)
public void register(RExpression observer)
public void dispose()
- Dispose of this RExpression. Release the references
on the observers so that they can be garbage collected.
public void register(java.util.Set observers)
public java.util.Set getObservers()
public void check()
Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.