* @param changeProviders Providers of change events from masters keyed by the type of the master which
* produces their events.
*/
public MasterChangeManager(Map<MasterType, ChangeProvider> changeProviders) {
for (Map.Entry<MasterType, ChangeProvider> entry : changeProviders.entrySet()) {
final MasterType masterType = entry.getKey();
ChangeProvider changeProvider = entry.getValue();
changeProvider.changeManager().addChangeListener(new ChangeListener() {
@Override
public void entityChanged(ChangeEvent event) {
MasterChangeManager.this.entityChanged(masterType);