Record Class RootVariableSource<Entity_,Value_>
java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.domain.variable.declarative.RootVariableSource<Entity_,Value_>
@NullMarked
public record RootVariableSource<Entity_,Value_> (Class<? extends Entity_> rootEntity, List<MemberAccessor> listMemberAccessors, BiConsumer<Object,Consumer<Value_>> valueEntityFunction, List<VariableSourceReference> variableSourceReferences, String variablePath, ParentVariableType parentVariableType, @Nullable ParentVariableType groupParentVariableType)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRootVariableSource(Class<? extends Entity_> rootEntity, List<MemberAccessor> listMemberAccessors, BiConsumer<Object, Consumer<Value_>> valueEntityFunction, List<VariableSourceReference> variableSourceReferences, String variablePath, ParentVariableType parentVariableType, @Nullable ParentVariableType groupParentVariableType) Creates an instance of aRootVariableSourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static <Entity_,Value_>
RootVariableSource<Entity_,Value_> from(PlanningSolutionMetaModel<?> solutionMetaModel, Class<? extends Entity_> rootEntityClass, String targetVariableName, String variablePath, MemberAccessorFactory memberAccessorFactory, DescriptorPolicy descriptorPolicy) @NonNull BiConsumer<Object,Consumer<Object>> getEntityVisitor(List<MemberAccessor> chainToEntity) static Member@Nullable ParentVariableTypeReturns the value of thegroupParentVariableTyperecord component.final inthashCode()Returns a hash code value for this object.static booleanisVariable(PlanningSolutionMetaModel<?> metaModel, Class<?> declaringClass, String memberName) Returns the value of thelistMemberAccessorsrecord component.Returns the value of theparentVariableTyperecord component.pathIterator(Class<?> rootEntity, String path) Returns the value of therootEntityrecord component.@NonNull StringtoString()Returns a string representation of this record class.Returns the value of thevalueEntityFunctionrecord component.Returns the value of thevariablePathrecord component.Returns the value of thevariableSourceReferencesrecord component.
-
Field Details
-
COLLECTION_REFERENCE_SUFFIX
- See Also:
-
MEMBER_SEPERATOR_REGEX
- See Also:
-
-
Constructor Details
-
RootVariableSource
public RootVariableSource(Class<? extends Entity_> rootEntity, List<MemberAccessor> listMemberAccessors, BiConsumer<Object, Consumer<Value_>> valueEntityFunction, List<VariableSourceReference> variableSourceReferences, String variablePath, ParentVariableType parentVariableType, @Nullable ParentVariableType groupParentVariableType) Creates an instance of aRootVariableSourcerecord class.- Parameters:
rootEntity- the value for therootEntityrecord componentlistMemberAccessors- the value for thelistMemberAccessorsrecord componentvalueEntityFunction- the value for thevalueEntityFunctionrecord componentvariableSourceReferences- the value for thevariableSourceReferencesrecord componentvariablePath- the value for thevariablePathrecord componentparentVariableType- the value for theparentVariableTyperecord componentgroupParentVariableType- the value for thegroupParentVariableTyperecord component
-
-
Method Details
-
pathIterator
-
from
public static <Entity_,Value_> RootVariableSource<Entity_,Value_> from(PlanningSolutionMetaModel<?> solutionMetaModel, Class<? extends Entity_> rootEntityClass, String targetVariableName, String variablePath, MemberAccessorFactory memberAccessorFactory, DescriptorPolicy descriptorPolicy) -
getEntityVisitor
public @NonNull BiConsumer<Object,Consumer<Object>> getEntityVisitor(List<MemberAccessor> chainToEntity) -
getMember
-
isVariable
public static boolean isVariable(PlanningSolutionMetaModel<?> metaModel, Class<?> declaringClass, String memberName) -
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. -
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. -
equals
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. All components in this record class are compared withObjects::equals(Object,Object). -
rootEntity
Returns the value of therootEntityrecord component.- Returns:
- the value of the
rootEntityrecord component
-
listMemberAccessors
Returns the value of thelistMemberAccessorsrecord component.- Returns:
- the value of the
listMemberAccessorsrecord component
-
valueEntityFunction
Returns the value of thevalueEntityFunctionrecord component.- Returns:
- the value of the
valueEntityFunctionrecord component
-
variableSourceReferences
Returns the value of thevariableSourceReferencesrecord component.- Returns:
- the value of the
variableSourceReferencesrecord component
-
variablePath
Returns the value of thevariablePathrecord component.- Returns:
- the value of the
variablePathrecord component
-
parentVariableType
Returns the value of theparentVariableTyperecord component.- Returns:
- the value of the
parentVariableTyperecord component
-
groupParentVariableType
Returns the value of thegroupParentVariableTyperecord component.- Returns:
- the value of the
groupParentVariableTyperecord component
-