may represent the ages of all
customers and it is useful to display the average age of all customers. The
average can be modeled as a Calculation
which is updated as the
contents of the EventList change and in turn broadcast PropertyChangeEvents
to registered listeners describing a change in the calculated value.
In this way, Calculation object represent a continuation of data
transformation from the domain of Lists to the domain of simple Number
objects calculated from the elements of those Lists.
- Author:
- James Lemieux
addPropertyChangeListener
void addPropertyChangeListener(PropertyChangeListener pcl)
- Parameters:
pcl
- a PropertyChangeListener to notify any time the
value
changes
removePropertyChangeListener
void removePropertyChangeListener(PropertyChangeListener pcl)
- Parameters:
pcl
- a PropertyChangeListener which should no longer be notified
of value
changes
getName
String getName()
- Returns:
- a human readable name for this Calculation
setName
void setName(String name)
- Adjusts the Calculation to have the new
name
;
- Parameters:
name
- the new human-readable name of this Calculation
getValue
N getValue()
- Returns:
- the latest calculated value
dispose
void dispose()
- Cease the updating of this Calculation from its data sources and free
them for garbage collection.
Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by hbrands at 2017-03-13 22:58