Record Class VariableSourceReference

java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.domain.variable.declarative.VariableSourceReference

@NullMarked public record VariableSourceReference(VariableMetaModel<?,?,?> variableMetaModel, List<MemberAccessor> chainToVariableEntity, boolean onRootEntity, boolean isTopLevel, boolean isBottomLevel, boolean isDeclarative, VariableMetaModel<?,?,?> targetVariableMetamodel, @Nullable VariableMetaModel<?,?,?> downstreamDeclarativeVariableMetamodel, Function<Object,@Nullable Object> targetEntityFunctionStartingFromVariableEntity) extends Record
  • Constructor Details

    • VariableSourceReference

      public VariableSourceReference(VariableMetaModel<?,?,?> variableMetaModel, List<MemberAccessor> chainToVariableEntity, boolean onRootEntity, boolean isTopLevel, boolean isBottomLevel, boolean isDeclarative, VariableMetaModel<?,?,?> targetVariableMetamodel, @Nullable VariableMetaModel<?,?,?> downstreamDeclarativeVariableMetamodel, Function<Object,@Nullable Object> targetEntityFunctionStartingFromVariableEntity)
      Creates an instance of a VariableSourceReference record class.
      Parameters:
      variableMetaModel - the value for the variableMetaModel record component
      chainToVariableEntity - the value for the chainToVariableEntity record component
      onRootEntity - the value for the onRootEntity record component
      isTopLevel - the value for the isTopLevel record component
      isBottomLevel - the value for the isBottomLevel record component
      isDeclarative - the value for the isDeclarative record component
      targetVariableMetamodel - the value for the targetVariableMetamodel record component
      downstreamDeclarativeVariableMetamodel - the value for the downstreamDeclarativeVariableMetamodel record component
      targetEntityFunctionStartingFromVariableEntity - the value for the targetEntityFunctionStartingFromVariableEntity record component
  • Method Details

    • affectGraphEdges

      public boolean affectGraphEdges()
    • findTargetEntity

      public @Nullable Object findTargetEntity(Object entity)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • variableMetaModel

      public VariableMetaModel<?,?,?> variableMetaModel()
      Returns the value of the variableMetaModel record component.
      Returns:
      the value of the variableMetaModel record component
    • chainToVariableEntity

      public List<MemberAccessor> chainToVariableEntity()
      Returns the value of the chainToVariableEntity record component.
      Returns:
      the value of the chainToVariableEntity record component
    • onRootEntity

      public boolean onRootEntity()
      Returns the value of the onRootEntity record component.
      Returns:
      the value of the onRootEntity record component
    • isTopLevel

      public boolean isTopLevel()
      Returns the value of the isTopLevel record component.
      Returns:
      the value of the isTopLevel record component
    • isBottomLevel

      public boolean isBottomLevel()
      Returns the value of the isBottomLevel record component.
      Returns:
      the value of the isBottomLevel record component
    • isDeclarative

      public boolean isDeclarative()
      Returns the value of the isDeclarative record component.
      Returns:
      the value of the isDeclarative record component
    • targetVariableMetamodel

      public VariableMetaModel<?,?,?> targetVariableMetamodel()
      Returns the value of the targetVariableMetamodel record component.
      Returns:
      the value of the targetVariableMetamodel record component
    • downstreamDeclarativeVariableMetamodel

      public @Nullable VariableMetaModel<?,?,?> downstreamDeclarativeVariableMetamodel()
      Returns the value of the downstreamDeclarativeVariableMetamodel record component.
      Returns:
      the value of the downstreamDeclarativeVariableMetamodel record component
    • targetEntityFunctionStartingFromVariableEntity

      public Function<Object,@Nullable Object> targetEntityFunctionStartingFromVariableEntity()
      Returns the value of the targetEntityFunctionStartingFromVariableEntity record component.
      Returns:
      the value of the targetEntityFunctionStartingFromVariableEntity record component