Class DefaultGenuineEntityMetaModel<Solution_,Entity_>
java.lang.Object
ai.timefold.solver.core.impl.domain.solution.descriptor.DefaultGenuineEntityMetaModel<Solution_,Entity_>
- All Implemented Interfaces:
GenuineEntityMetaModel<Solution_,,Entity_> PlanningEntityMetaModel<Solution_,Entity_>
@NullMarked
public final class DefaultGenuineEntityMetaModel<Solution_,Entity_>
extends Object
implements GenuineEntityMetaModel<Solution_,Entity_>
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddVariable(VariableMetaModel<Solution_, Entity_, ?> variable) <Value_> PlanningVariableMetaModel<Solution_,Entity_, Value_> As defined byGenuineEntityMetaModel.genuineVariable(), but only succeeds if the variable is abasic planning variable.<Value_> PlanningVariableMetaModel<Solution_,Entity_, Value_> basicVariable(String variableName) As defined byPlanningEntityMetaModel.variable(String), but only succeeds if the variable is abasic planning variable.<Value_> PlanningVariableMetaModel<Solution_,Entity_, Value_> basicVariable(String variableName, Class<Value_> variableClass) As defined byGenuineEntityMetaModel.basicVariable(String), but only succeeds if the variable is of a given type.<Value_> GenuineVariableMetaModel<Solution_,Entity_, Value_> Returns a single genuine variable declared by the entity.<Value_> GenuineVariableMetaModel<Solution_,Entity_, Value_> genuineVariable(String variableName) Returns aPlanningVariableMetaModelfor a variable with the given name.<Value_> GenuineVariableMetaModel<Solution_,Entity_, Value_> genuineVariable(String variableName, Class<Value_> variableClass) Returns aPlanningVariableMetaModelfor a variable with the given name.<Value_> PlanningListVariableMetaModel<Solution_,Entity_, Value_> As defined byGenuineEntityMetaModel.genuineVariable(), but only succeeds if the variable is aplanning list variable.<Value_> PlanningListVariableMetaModel<Solution_,Entity_, Value_> listVariable(String variableName) As defined byPlanningEntityMetaModel.variable(String), but only succeeds if the variable is aplanning list variable.<Value_> PlanningListVariableMetaModel<Solution_,Entity_, Value_> listVariable(String variableName, Class<Value_> variableClass) As defined byGenuineEntityMetaModel.listVariable(String), but only succeeds if the variable is of a given type.<Value_> ShadowVariableMetaModel<Solution_,Entity_, Value_> shadowVariable(String variableName) As defined byPlanningEntityMetaModel.variable(String), but only succeeds if the variable is a shadow variable.<Value_> ShadowVariableMetaModel<Solution_,Entity_, Value_> shadowVariable(String variableName, Class<Value_> variableClass) As defined byGenuineEntityMetaModel.shadowVariable(String), but only succeeds if the variable is of a given type.solution()Describes thePlanningSolutionthat owns this entity.toString()type()Returns the most specific class of the entity.Returns the variables declared by the entity, both genuine and shadow.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ai.timefold.solver.core.preview.api.domain.metamodel.GenuineEntityMetaModel
genuineVariablesMethods inherited from interface ai.timefold.solver.core.preview.api.domain.metamodel.PlanningEntityMetaModel
hasVariable, isGenuine, variable, variable
-
Method Details
-
entityDescriptor
-
solution
Description copied from interface:PlanningEntityMetaModelDescribes thePlanningSolutionthat owns this entity.- Specified by:
solutionin interfacePlanningEntityMetaModel<Solution_,Entity_> - Returns:
- never null, the solution meta-model.
-
type
Description copied from interface:PlanningEntityMetaModelReturns the most specific class of the entity.- Specified by:
typein interfacePlanningEntityMetaModel<Solution_,Entity_> - Returns:
- The entity type.
-
variables
Description copied from interface:PlanningEntityMetaModelReturns the variables declared by the entity, both genuine and shadow.- Specified by:
variablesin interfacePlanningEntityMetaModel<Solution_,Entity_> - Returns:
- Variables declared by the entity.
-
genuineVariable
Description copied from interface:GenuineEntityMetaModelReturns a single genuine variable declared by the entity.- Specified by:
genuineVariablein interfaceGenuineEntityMetaModel<Solution_,Entity_> - Type Parameters:
Value_- The type of the value of the variable.- Returns:
- The single genuine variable declared by the entity.
-
genuineVariable
public <Value_> GenuineVariableMetaModel<Solution_,Entity_, genuineVariableValue_> (String variableName) Description copied from interface:GenuineEntityMetaModelReturns aPlanningVariableMetaModelfor a variable with the given name.- Specified by:
genuineVariablein interfaceGenuineEntityMetaModel<Solution_,Entity_> - Returns:
- A genuine variable declared by the entity.
-
genuineVariable
public <Value_> GenuineVariableMetaModel<Solution_,Entity_, genuineVariableValue_> (String variableName, Class<Value_> variableClass) Description copied from interface:GenuineEntityMetaModelReturns aPlanningVariableMetaModelfor a variable with the given name.- Specified by:
genuineVariablein interfaceGenuineEntityMetaModel<Solution_,Entity_> - Returns:
- A genuine variable declared by the entity.
-
basicVariable
Description copied from interface:GenuineEntityMetaModelAs defined byGenuineEntityMetaModel.genuineVariable(), but only succeeds if the variable is abasic planning variable.- Specified by:
basicVariablein interfaceGenuineEntityMetaModel<Solution_,Entity_>
-
basicVariable
public <Value_> PlanningVariableMetaModel<Solution_,Entity_, basicVariableValue_> (String variableName) Description copied from interface:GenuineEntityMetaModelAs defined byPlanningEntityMetaModel.variable(String), but only succeeds if the variable is abasic planning variable.- Specified by:
basicVariablein interfaceGenuineEntityMetaModel<Solution_,Entity_>
-
basicVariable
public <Value_> PlanningVariableMetaModel<Solution_,Entity_, basicVariableValue_> (String variableName, Class<Value_> variableClass) Description copied from interface:GenuineEntityMetaModelAs defined byGenuineEntityMetaModel.basicVariable(String), but only succeeds if the variable is of a given type.- Specified by:
basicVariablein interfaceGenuineEntityMetaModel<Solution_,Entity_>
-
listVariable
Description copied from interface:GenuineEntityMetaModelAs defined byGenuineEntityMetaModel.genuineVariable(), but only succeeds if the variable is aplanning list variable.- Specified by:
listVariablein interfaceGenuineEntityMetaModel<Solution_,Entity_>
-
listVariable
public <Value_> PlanningListVariableMetaModel<Solution_,Entity_, listVariableValue_> (String variableName) Description copied from interface:GenuineEntityMetaModelAs defined byPlanningEntityMetaModel.variable(String), but only succeeds if the variable is aplanning list variable.- Specified by:
listVariablein interfaceGenuineEntityMetaModel<Solution_,Entity_>
-
listVariable
public <Value_> PlanningListVariableMetaModel<Solution_,Entity_, listVariableValue_> (String variableName, Class<Value_> variableClass) Description copied from interface:GenuineEntityMetaModelAs defined byGenuineEntityMetaModel.listVariable(String), but only succeeds if the variable is of a given type.- Specified by:
listVariablein interfaceGenuineEntityMetaModel<Solution_,Entity_>
-
shadowVariable
public <Value_> ShadowVariableMetaModel<Solution_,Entity_, shadowVariableValue_> (String variableName) Description copied from interface:GenuineEntityMetaModelAs defined byPlanningEntityMetaModel.variable(String), but only succeeds if the variable is a shadow variable.- Specified by:
shadowVariablein interfaceGenuineEntityMetaModel<Solution_,Entity_>
-
shadowVariable
public <Value_> ShadowVariableMetaModel<Solution_,Entity_, shadowVariableValue_> (String variableName, Class<Value_> variableClass) Description copied from interface:GenuineEntityMetaModelAs defined byGenuineEntityMetaModel.shadowVariable(String), but only succeeds if the variable is of a given type.- Specified by:
shadowVariablein interfaceGenuineEntityMetaModel<Solution_,Entity_>
-
addVariable
-
toString
-