Interface ListVariableElementStateSupply<Solution_>
- All Superinterfaces:
AbstractVariableListener<Solution_,,Object> AutoCloseable,Closeable,ListVariableListener<Solution_,,Object, Object> SourcedVariableListener<Solution_>,Supply
- All Known Subinterfaces:
ListVariableStateSupply<Solution_>
public interface ListVariableElementStateSupply<Solution_>
extends SourcedVariableListener<Solution_>, ListVariableListener<Solution_,Object,Object>
-
Method Summary
Modifier and TypeMethodDescriptiongetLocationInList(Object value) intConsider colling this beforeisAssigned(Object)to eliminate some map accesses.booleanisAssigned(Object element) Methods inherited from interface ai.timefold.solver.core.api.domain.variable.AbstractVariableListener
afterEntityAdded, afterEntityRemoved, beforeEntityAdded, beforeEntityRemoved, close, resetWorkingSolutionMethods inherited from interface ai.timefold.solver.core.api.domain.variable.ListVariableListener
afterListVariableChanged, afterListVariableElementUnassigned, beforeListVariableChangedMethods inherited from interface ai.timefold.solver.core.impl.domain.variable.listener.SourcedVariableListener
getSourceVariableDescriptor
-
Method Details
-
isAssigned
- Parameters:
element- never null- Returns:
- true if the element is contained in a list variable of any entity.
-
getLocationInList
- Parameters:
value- never null- Returns:
- never null
-
getUnassignedCount
int getUnassignedCount()Consider colling this beforeisAssigned(Object)to eliminate some map accesses. If unassigned count is 0,isAssigned(Object)is guaranteed to return true.- Returns:
- number of elements for which
isAssigned(Object)would return false.
-