Class FromEntityPropertyValueRangeDescriptor<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.domain.valuerange.descriptor.AbstractValueRangeDescriptor<Solution_>
-
- org.optaplanner.core.impl.domain.valuerange.descriptor.AbstractFromPropertyValueRangeDescriptor<Solution_>
-
- org.optaplanner.core.impl.domain.valuerange.descriptor.FromEntityPropertyValueRangeDescriptor<Solution_>
-
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotation
- All Implemented Interfaces:
ValueRangeDescriptor<Solution_>
public class FromEntityPropertyValueRangeDescriptor<Solution_> extends AbstractFromPropertyValueRangeDescriptor<Solution_>
-
-
Field Summary
-
Fields inherited from class org.optaplanner.core.impl.domain.valuerange.descriptor.AbstractFromPropertyValueRangeDescriptor
arrayWrapping, collectionWrapping, countable, memberAccessor
-
Fields inherited from class org.optaplanner.core.impl.domain.valuerange.descriptor.AbstractValueRangeDescriptor
addNullInValueRange, variableDescriptor
-
-
Constructor Summary
Constructors Constructor Description FromEntityPropertyValueRangeDescriptor(GenuineVariableDescriptor<Solution_> variableDescriptor, boolean addNullInValueRange, MemberAccessor memberAccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueRange<?>
extractValueRange(Solution_ solution, Object entity)
boolean
isEntityIndependent()
If this method return true, this instance is safe to cast toEntityIndependentValueRangeDescriptor
, otherwise it requires an entity to determine theValueRange
.-
Methods inherited from class org.optaplanner.core.impl.domain.valuerange.descriptor.AbstractFromPropertyValueRangeDescriptor
isCountable, readValueRange
-
Methods inherited from class org.optaplanner.core.impl.domain.valuerange.descriptor.AbstractValueRangeDescriptor
doNullInValueRangeWrapping, getVariableDescriptor, mightContainEntity, toString
-
-
-
-
Constructor Detail
-
FromEntityPropertyValueRangeDescriptor
public FromEntityPropertyValueRangeDescriptor(GenuineVariableDescriptor<Solution_> variableDescriptor, boolean addNullInValueRange, MemberAccessor memberAccessor)
-
-
Method Detail
-
isEntityIndependent
public boolean isEntityIndependent()
Description copied from interface:ValueRangeDescriptor
If this method return true, this instance is safe to cast toEntityIndependentValueRangeDescriptor
, otherwise it requires an entity to determine theValueRange
.- Returns:
- true if the
ValueRange
is the same for all entities of the same solution
-
extractValueRange
public ValueRange<?> extractValueRange(Solution_ solution, Object entity)
- Parameters:
solution
- never nullentity
- never null. To avoid this parameter, useEntityIndependentValueRangeDescriptor.extractValueRange(Solution_)
instead.- Returns:
- never null
-
-