public class ExternalizedCollectionInverseVariableSupply extends Object implements StatefulVariableListener<Object>, CollectionInverseVariableSupply
CollectionInverseVariableListener
.Modifier and Type | Field and Description |
---|---|
protected Map<Object,Set<Object>> |
inverseEntitySetMap |
protected VariableDescriptor |
sourceVariableDescriptor |
Constructor and Description |
---|
ExternalizedCollectionInverseVariableSupply(VariableDescriptor sourceVariableDescriptor) |
Modifier and Type | Method and Description |
---|---|
void |
afterEntityAdded(ScoreDirector scoreDirector,
Object entity) |
void |
afterEntityRemoved(ScoreDirector scoreDirector,
Object entity) |
void |
afterVariableChanged(ScoreDirector scoreDirector,
Object entity) |
void |
beforeEntityAdded(ScoreDirector scoreDirector,
Object entity) |
void |
beforeEntityRemoved(ScoreDirector scoreDirector,
Object entity) |
void |
beforeVariableChanged(ScoreDirector scoreDirector,
Object entity) |
void |
clearWorkingSolution(ScoreDirector scoreDirector) |
Collection<?> |
getInverseCollection(Object value)
If entity1.varA = x then an inverse of x is entity1.
|
VariableDescriptor |
getSourceVariableDescriptor() |
protected void |
insert(ScoreDirector scoreDirector,
Object entity) |
void |
resetWorkingSolution(ScoreDirector scoreDirector) |
protected void |
retract(ScoreDirector scoreDirector,
Object entity) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
requiresUniqueEntityEvents
protected final VariableDescriptor sourceVariableDescriptor
public ExternalizedCollectionInverseVariableSupply(VariableDescriptor sourceVariableDescriptor)
public VariableDescriptor getSourceVariableDescriptor()
getSourceVariableDescriptor
in interface StatefulVariableListener<Object>
public void resetWorkingSolution(ScoreDirector scoreDirector)
resetWorkingSolution
in interface StatefulVariableListener<Object>
public void clearWorkingSolution(ScoreDirector scoreDirector)
clearWorkingSolution
in interface StatefulVariableListener<Object>
public void beforeEntityAdded(ScoreDirector scoreDirector, Object entity)
beforeEntityAdded
in interface VariableListener<Object>
scoreDirector
- never nullentity
- never nullpublic void afterEntityAdded(ScoreDirector scoreDirector, Object entity)
afterEntityAdded
in interface VariableListener<Object>
scoreDirector
- never nullentity
- never nullpublic void beforeVariableChanged(ScoreDirector scoreDirector, Object entity)
beforeVariableChanged
in interface VariableListener<Object>
scoreDirector
- never nullentity
- never nullpublic void afterVariableChanged(ScoreDirector scoreDirector, Object entity)
afterVariableChanged
in interface VariableListener<Object>
scoreDirector
- never nullentity
- never nullpublic void beforeEntityRemoved(ScoreDirector scoreDirector, Object entity)
beforeEntityRemoved
in interface VariableListener<Object>
scoreDirector
- never nullentity
- never nullpublic void afterEntityRemoved(ScoreDirector scoreDirector, Object entity)
afterEntityRemoved
in interface VariableListener<Object>
scoreDirector
- never nullentity
- never nullprotected void insert(ScoreDirector scoreDirector, Object entity)
protected void retract(ScoreDirector scoreDirector, Object entity)
public Collection<?> getInverseCollection(Object value)
CollectionInverseVariableSupply
getInverseCollection
in interface CollectionInverseVariableSupply
value
- never nullCollection
of entities for which the planning variable is the planningValue.Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.