Package org.optaplanner.core.impl.domain.variable.inverserelation

## Class CollectionInverseVariableDemand<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.domain.variable.inverserelation.CollectionInverseVariableDemand<Solution_>

- All Implemented Interfaces:
    `Demand<Solution_,​CollectionInverseVariableSupply>`

      public class CollectionInverseVariableDemand<Solution_>
      extends Object
      implements Demand<Solution_,​CollectionInverseVariableSupply>

  To get an instance, demand a `CollectionInverseVariableDemand` from `InnerScoreDirector.getSupplyManager()`.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected VariableDescriptor<Solution_>` | `sourceVariableDescriptor` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CollectionInverseVariableDemand​(VariableDescriptor<Solution_> sourceVariableDescriptor)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `CollectionInverseVariableSupply` | `createExternalizedSupply​(InnerScoreDirector<Solution_,​?> scoreDirector)` | Only called if the domain model doesn't already support the demand (through a shadow variable usually).
    `boolean` | `equals​(Object o)` |
    `VariableDescriptor<Solution_>` | `getSourceVariableDescriptor()` |
    `int` | `hashCode()` |
    `String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### sourceVariableDescriptor

          protected final VariableDescriptor<Solution_> sourceVariableDescriptor

  - ### Constructor Detail

    - #### CollectionInverseVariableDemand

          public CollectionInverseVariableDemand​(VariableDescriptor<Solution_> sourceVariableDescriptor)

  - ### Method Detail

    - #### getSourceVariableDescriptor

          public VariableDescriptor<Solution_> getSourceVariableDescriptor()

    - #### createExternalizedSupply

          public CollectionInverseVariableSupply createExternalizedSupply​(InnerScoreDirector<Solution_,​?> scoreDirector)

      Description copied from interface: `Demand`
      Only called if the domain model doesn't already support the demand (through a shadow variable usually). Equal demands share the same `Supply`.
      Specified by:
        `createExternalizedSupply` in interface `Demand<Solution_,​CollectionInverseVariableSupply>`
      Parameters:
        `scoreDirector` - never null
      Returns:
        never null

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`