org.optaplanner.core.impl.domain.variable.listener
Class VariableListenerSupport
java.lang.Object
org.optaplanner.core.impl.domain.variable.listener.VariableListenerSupport
- All Implemented Interfaces:
- SupplyManager
public class VariableListenerSupport
- extends Object
- implements SupplyManager
Method Summary |
void |
afterEntityAdded(InnerScoreDirector scoreDirector,
EntityDescriptor entityDescriptor,
Object entity)
|
void |
afterEntityRemoved(InnerScoreDirector scoreDirector,
EntityDescriptor entityDescriptor,
Object entity)
|
void |
afterVariableChanged(InnerScoreDirector scoreDirector,
VariableDescriptor variableDescriptor,
Object entity)
|
void |
beforeEntityAdded(InnerScoreDirector scoreDirector,
EntityDescriptor entityDescriptor,
Object entity)
|
void |
beforeEntityRemoved(InnerScoreDirector scoreDirector,
EntityDescriptor entityDescriptor,
Object entity)
|
void |
beforeVariableChanged(InnerScoreDirector scoreDirector,
VariableDescriptor variableDescriptor,
Object entity)
|
void |
buildVariableListeners(List<VariableListener> entityVariableListenerList,
VariableDescriptor variableDescriptor)
|
void |
clearWorkingSolution(InnerScoreDirector scoreDirector)
|
|
demand(Demand<S> demand)
Returns the Supply for a Demand , preferably an existing one. |
void |
linkVariableListeners()
|
void |
resetWorkingSolution(InnerScoreDirector scoreDirector)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
scoreDirector
protected final InnerScoreDirector scoreDirector
variableListenerMap
protected final Map<VariableDescriptor,List<VariableListener>> variableListenerMap
entityVariableListenerMap
protected final Map<EntityDescriptor,List<VariableListener>> entityVariableListenerMap
supplyMap
protected final Map<Demand,Supply> supplyMap
VariableListenerSupport
public VariableListenerSupport(InnerScoreDirector scoreDirector)
linkVariableListeners
public void linkVariableListeners()
buildVariableListeners
public void buildVariableListeners(List<VariableListener> entityVariableListenerList,
VariableDescriptor variableDescriptor)
demand
public <S extends Supply> S demand(Demand<S> demand)
- Description copied from interface:
SupplyManager
- Returns the
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.
- Specified by:
demand
in interface SupplyManager
- Parameters:
demand
- never null
- Returns:
- never null
resetWorkingSolution
public void resetWorkingSolution(InnerScoreDirector scoreDirector)
clearWorkingSolution
public void clearWorkingSolution(InnerScoreDirector scoreDirector)
beforeEntityAdded
public void beforeEntityAdded(InnerScoreDirector scoreDirector,
EntityDescriptor entityDescriptor,
Object entity)
afterEntityAdded
public void afterEntityAdded(InnerScoreDirector scoreDirector,
EntityDescriptor entityDescriptor,
Object entity)
beforeVariableChanged
public void beforeVariableChanged(InnerScoreDirector scoreDirector,
VariableDescriptor variableDescriptor,
Object entity)
afterVariableChanged
public void afterVariableChanged(InnerScoreDirector scoreDirector,
VariableDescriptor variableDescriptor,
Object entity)
beforeEntityRemoved
public void beforeEntityRemoved(InnerScoreDirector scoreDirector,
EntityDescriptor entityDescriptor,
Object entity)
afterEntityRemoved
public void afterEntityRemoved(InnerScoreDirector scoreDirector,
EntityDescriptor entityDescriptor,
Object entity)
Copyright © 2006-2015 JBoss by Red Hat. All Rights Reserved.