|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.odell.glazedlists.calculation.AbstractCalculation<N>
ca.odell.glazedlists.calculation.AbstractCompositeCalculation<N>
public abstract class AbstractCompositeCalculation<N extends Number>
Advanced Calculations can be derived by combining many smaller Calculations together using a formula. This abstract class advances toward the goal of combining multiple input Calculations using any arithmetic expression to produce the value of this calculation.
When any of the input Calculations change their value, this composite Calculation responds by recomputing its own value.
Constructor Summary | |
---|---|
protected |
AbstractCompositeCalculation(Calculation<? extends Number>... inputs)
Combines the given inputs with the logic in recompute(java.lang.Number[])
to produce the value of this Calculation. |
Method Summary | |
---|---|
void |
dispose()
Cease the updating of this Calculation from its data sources and free them for garbage collection. |
void |
propertyChange(PropertyChangeEvent evt)
When any of the input Calculations report a change, this composite calculation is also recalculated in response. |
protected abstract N |
recompute(Number[] inputs)
Provides the logic to combine the inputs into the single
numeric value of this composite calculation. |
Methods inherited from class ca.odell.glazedlists.calculation.AbstractCalculation |
---|
addPropertyChangeListener, fireValueChange, getName, getValue, removePropertyChangeListener, setName, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractCompositeCalculation(Calculation<? extends 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 CalculationMethod Detail |
---|
public void dispose()
Calculation
dispose
in interface Calculation<N extends Number>
protected abstract N recompute(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 Calculations
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |