Class CustomShadowVariableDemand<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.domain.variable.custom.CustomShadowVariableDemand<Solution_>
-
- All Implemented Interfaces:
Demand<CustomShadowVariableDemand.NoSupply>
public class CustomShadowVariableDemand<Solution_> extends Object implements Demand<CustomShadowVariableDemand.NoSupply>
Unlike otherDemand
s, a custom demand isn't equalized based on its sources, but based on its target. Therefore a custom shadow variable cannot be reused by built-in systems.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CustomShadowVariableDemand.NoSupply
-
Constructor Summary
Constructors Constructor Description CustomShadowVariableDemand(CustomShadowVariableDescriptor<Solution_> targetShadowVariableDescriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomShadowVariableDemand.NoSupply
createExternalizedSupply(SupplyManager supplyManager)
Only called if the domain model doesn't already support the demand (through a shadow variable usually).boolean
equals(Object o)
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
CustomShadowVariableDemand
public CustomShadowVariableDemand(CustomShadowVariableDescriptor<Solution_> targetShadowVariableDescriptor)
-
-
Method Detail
-
createExternalizedSupply
public CustomShadowVariableDemand.NoSupply createExternalizedSupply(SupplyManager supplyManager)
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 sameSupply
.- Specified by:
createExternalizedSupply
in interfaceDemand<Solution_>
- Parameters:
supplyManager
- never null- Returns:
- never null
-
-