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

## Class CollectionInverseVariableDemand

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

- All Implemented Interfaces:
    Demand<CollectionInverseVariableSupply>

      public class CollectionInverseVariableDemand
      extends Object
      implements Demand<CollectionInverseVariableSupply>

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

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CollectionInverseVariableDemand(VariableDescriptor sourceVariableDescriptor)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CollectionInverseVariableSupply` | `createExternalizedSupply(InnerScoreDirector scoreDirector)` Only called if the domain model doesn't already support the demand (through a shadow variable usually).
    `boolean` | `equals(Object o)`
    `VariableDescriptor` | `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 sourceVariableDescriptor

  - ### Constructor Detail

    - #### CollectionInverseVariableDemand

          public CollectionInverseVariableDemand(VariableDescriptor sourceVariableDescriptor)

  - ### Method Detail

    - #### getSourceVariableDescriptor

          public VariableDescriptor getSourceVariableDescriptor()

    - #### createExternalizedSupply

          public CollectionInverseVariableSupply createExternalizedSupply(InnerScoreDirector 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<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`

Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.