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 Details

    • isAssigned

      boolean isAssigned(Object element)
      Parameters:
      element - never null
      Returns:
      true if the element is contained in a list variable of any entity.
    • getLocationInList

      ElementLocation getLocationInList(Object value)
      Parameters:
      value - never null
      Returns:
      never null
    • getUnassignedCount

      int getUnassignedCount()
      Consider colling this before isAssigned(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.