public class VariableListenerSupport extends Object implements SupplyManager
Modifier and Type | Field and Description |
---|---|
protected Map<EntityDescriptor,List<VariableListener>> |
entityVariableListenerMap |
protected InnerScoreDirector |
scoreDirector |
protected Map<Demand,Supply> |
supplyMap |
protected Map<VariableDescriptor,List<VariableListener>> |
variableListenerMap |
Constructor and Description |
---|
VariableListenerSupport(InnerScoreDirector scoreDirector) |
protected final InnerScoreDirector scoreDirector
protected final Map<VariableDescriptor,List<VariableListener>> variableListenerMap
protected final Map<EntityDescriptor,List<VariableListener>> entityVariableListenerMap
public VariableListenerSupport(InnerScoreDirector scoreDirector)
public void linkVariableListeners()
public void buildVariableListeners(List<VariableListener> entityVariableListenerList, VariableDescriptor variableDescriptor)
public <S extends Supply> S demand(Demand<S> demand)
SupplyManager
Supply
for a Demand
, preferably an existing one.
If the Supply
doesn't exist yet (as part of the domain model or externalized), it creates and attaches it.demand
in interface SupplyManager
demand
- never nullpublic void resetWorkingSolution(InnerScoreDirector scoreDirector)
public void clearWorkingSolution(InnerScoreDirector scoreDirector)
public void beforeEntityAdded(InnerScoreDirector scoreDirector, EntityDescriptor entityDescriptor, Object entity)
public void afterEntityAdded(InnerScoreDirector scoreDirector, EntityDescriptor entityDescriptor, Object entity)
public void beforeVariableChanged(InnerScoreDirector scoreDirector, VariableDescriptor variableDescriptor, Object entity)
public void afterVariableChanged(InnerScoreDirector scoreDirector, VariableDescriptor variableDescriptor, Object entity)
public void beforeEntityRemoved(InnerScoreDirector scoreDirector, EntityDescriptor entityDescriptor, Object entity)
public void afterEntityRemoved(InnerScoreDirector scoreDirector, EntityDescriptor entityDescriptor, Object entity)
Copyright © 2006-2015 JBoss by Red Hat. All Rights Reserved.