Class FromEntityPropertyValueRangeDescriptor<Solution_>
java.lang.Object
ai.timefold.solver.core.impl.domain.valuerange.descriptor.AbstractValueRangeDescriptor<Solution_>
ai.timefold.solver.core.impl.domain.valuerange.descriptor.AbstractFromPropertyValueRangeDescriptor<Solution_>
ai.timefold.solver.core.impl.domain.valuerange.descriptor.FromEntityPropertyValueRangeDescriptor<Solution_>
- Type Parameters:
Solution_- the solution type, the class with thePlanningSolutionannotation
- All Implemented Interfaces:
ValueRangeDescriptor<Solution_>
public class FromEntityPropertyValueRangeDescriptor<Solution_>
extends AbstractFromPropertyValueRangeDescriptor<Solution_>
-
Field Summary
Fields inherited from class ai.timefold.solver.core.impl.domain.valuerange.descriptor.AbstractFromPropertyValueRangeDescriptor
arrayWrapping, collectionWrapping, countable, memberAccessorFields inherited from class ai.timefold.solver.core.impl.domain.valuerange.descriptor.AbstractValueRangeDescriptor
addNullInValueRange, variableDescriptor -
Constructor Summary
ConstructorsConstructorDescriptionFromEntityPropertyValueRangeDescriptor(GenuineVariableDescriptor<Solution_> variableDescriptor, boolean addNullInValueRange, MemberAccessor memberAccessor) -
Method Summary
Modifier and TypeMethodDescription<Value_> ValueRange<Value_>extractValueRange(Solution_ solution, Object entity) longextractValueRangeSize(Solution_ solution, Object entity) booleanIf this method return true, this instance is safe to cast toEntityIndependentValueRangeDescriptor, otherwise it requires an entity to determine theValueRange.Methods inherited from class ai.timefold.solver.core.impl.domain.valuerange.descriptor.AbstractFromPropertyValueRangeDescriptor
isCountable, readValueRange, readValueRangeSizeMethods inherited from class ai.timefold.solver.core.impl.domain.valuerange.descriptor.AbstractValueRangeDescriptor
doNullInValueRangeWrapping, getVariableDescriptor, mightContainEntity, toString
-
Constructor Details
-
FromEntityPropertyValueRangeDescriptor
public FromEntityPropertyValueRangeDescriptor(GenuineVariableDescriptor<Solution_> variableDescriptor, boolean addNullInValueRange, MemberAccessor memberAccessor)
-
-
Method Details
-
isEntityIndependent
public boolean isEntityIndependent()Description copied from interface:ValueRangeDescriptorIf this method return true, this instance is safe to cast toEntityIndependentValueRangeDescriptor, otherwise it requires an entity to determine theValueRange.- Returns:
- true if the
ValueRangeis the same for all entities of the same solution
-
extractValueRange
- Parameters:
solution- never nullentity- never null. To avoid this parameter, useEntityIndependentValueRangeDescriptor.extractValueRange(Solution_)instead.- Returns:
- never null
-
extractValueRangeSize
- Parameters:
solution- never nullentity- never null. To avoid this parameter, useEntityIndependentValueRangeDescriptor.extractValueRangeSize(Solution_)instead.- Returns:
- never null
-