public abstract class AbstractCompositeCalculation<N extends java.lang.Number> extends AbstractCalculation<N> implements java.beans.PropertyChangeListener
When any of the input Calculations change their value, this composite Calculation responds by recomputing its own value.
Modifier | Constructor and Description |
---|---|
protected |
AbstractCompositeCalculation(Calculation<? extends java.lang.Number>... inputs)
Combines the given
inputs with the logic in recompute(java.lang.Number[])
to produce the value of this Calculation. |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Cease the updating of this Calculation from its data sources and free
them for garbage collection.
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
When any of the input Calculations report a change, this composite
calculation is also recalculated in response.
|
protected abstract N |
recompute(java.lang.Number[] inputs)
Provides the logic to combine the
inputs into the single
numeric value of this composite calculation. |
addPropertyChangeListener, fireValueChange, getName, getValue, removePropertyChangeListener, setName, setValue
protected AbstractCompositeCalculation(Calculation<? extends java.lang.Number>... inputs)
inputs
with the logic in recompute(java.lang.Number[])
to produce the value of this Calculation.inputs
- smaller Calculations to combine to produce this Calculationpublic void dispose()
Calculation
dispose
in interface Calculation<N extends java.lang.Number>
protected abstract N recompute(java.lang.Number[] inputs)
inputs
into the single
numeric value of this composite calculation. The inputs can be combined
using any desirable arithmetic expression.inputs
- the values of the composed Calculationspublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by mockbuild at 2013-10-14 14:59