Interface PlanningEntityMetaModel<Solution_,Entity_>
- Type Parameters:
Solution_- The solution type.Entity_- The entity type.
- All Known Implementing Classes:
DefaultPlanningEntityMetaModel
public interface PlanningEntityMetaModel<Solution_,Entity_>
Represents the meta-model of an entity.
Gives access to the entity's variable meta-models.
This package and all of its contents are part of the Move Streams API, which is under development and is only offered as a preview feature. There are no guarantees for backward compatibility; any class, method or field may change or be removed without prior notice, although we will strive to avoid this as much as possible.
We encourage you to try the API and give us feedback on your experience with it, before we finalize the API. Please direct your feedback to Timefold Solver Github.
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NonNull List<VariableMetaModel<Solution_,Entity_, ?>> Returns the genuine variables declared by the entity.default booleanReturns whether the entity declares any genuine variables.default <Value_> @NonNull PlanningListVariableMetaModel<Solution_,Entity_, Value_> planningListVariable(@NonNull String variableName) As defined byvariable(String), but only succeeds if the variable is aplanning list variable.default <Value_> @NonNull PlanningVariableMetaModel<Solution_,Entity_, Value_> planningVariable(@NonNull String variableName) As defined byvariable(String), but only succeeds if the variable is abasic planning variable.@NonNull PlanningSolutionMetaModel<Solution_>solution()Describes thePlanningSolutionthat owns this entity.type()Returns the most specific class of the entity.default <Value_> @NonNull VariableMetaModel<Solution_,Entity_, Value_> Returns aVariableMetaModelfor a variable with the given name.@NonNull List<VariableMetaModel<Solution_,Entity_, ?>> Returns the variables declared by the entity, both genuine and shadow.
-
Method Details
-
solution
@NonNull PlanningSolutionMetaModel<Solution_> solution()Describes thePlanningSolutionthat owns this entity.- Returns:
- never null, the solution meta-model.
-
type
Returns the most specific class of the entity.- Returns:
- The entity type.
-
variables
@NonNull List<VariableMetaModel<Solution_,Entity_, variables()?>> Returns the variables declared by the entity, both genuine and shadow.- Returns:
- Variables declared by the entity.
-
genuineVariables
Returns the genuine variables declared by the entity.- Returns:
- Genuine variables declared by the entity.
-
variable
default <Value_> @NonNull VariableMetaModel<Solution_,Entity_, variableValue_> (@NonNull String variableName) Returns aVariableMetaModelfor a variable with the given name.- Returns:
- A variable declared by the entity.
- Throws:
IllegalArgumentException- if the variable does not exist on the entity
-
planningVariable
default <Value_> @NonNull PlanningVariableMetaModel<Solution_,Entity_, planningVariableValue_> (@NonNull String variableName) As defined byvariable(String), but only succeeds if the variable is abasic planning variable. -
planningListVariable
default <Value_> @NonNull PlanningListVariableMetaModel<Solution_,Entity_, planningListVariableValue_> (@NonNull String variableName) As defined byvariable(String), but only succeeds if the variable is aplanning list variable. -
isGenuine
default boolean isGenuine()Returns whether the entity declares any genuine variables.- Returns:
- true if the entity declares any genuine variables, false otherwise.
-