Class FromSolutionPropertyValueRangeDescriptor<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.FromSolutionPropertyValueRangeDescriptor<Solution_>
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotation
- All Implemented Interfaces:
EntityIndependentValueRangeDescriptor<Solution_>
,ValueRangeDescriptor<Solution_>
public class FromSolutionPropertyValueRangeDescriptor<Solution_>
extends AbstractFromPropertyValueRangeDescriptor<Solution_>
implements EntityIndependentValueRangeDescriptor<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
ConstructorDescriptionFromSolutionPropertyValueRangeDescriptor
(GenuineVariableDescriptor<Solution_> variableDescriptor, boolean addNullInValueRange, MemberAccessor memberAccessor) -
Method Summary
Modifier and TypeMethodDescriptionValueRange<?>
extractValueRange
(Solution_ solution) As specified byValueRangeDescriptor.extractValueRange(Solution_, java.lang.Object)
.ValueRange<?>
extractValueRange
(Solution_ solution, Object entity) boolean
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.optaplanner.core.impl.domain.valuerange.descriptor.ValueRangeDescriptor
getVariableDescriptor, isCountable, mightContainEntity
-
Constructor Details
-
FromSolutionPropertyValueRangeDescriptor
public FromSolutionPropertyValueRangeDescriptor(GenuineVariableDescriptor<Solution_> variableDescriptor, boolean addNullInValueRange, MemberAccessor memberAccessor)
-
-
Method Details
-
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
.- Specified by:
isEntityIndependent
in interfaceValueRangeDescriptor<Solution_>
- Returns:
- true if the
ValueRange
is the same for all entities of the same solution
-
extractValueRange
- Specified by:
extractValueRange
in interfaceValueRangeDescriptor<Solution_>
- Parameters:
solution
- never nullentity
- never null. To avoid this parameter, useEntityIndependentValueRangeDescriptor.extractValueRange(Solution_)
instead.- Returns:
- never null
-
extractValueRange
Description copied from interface:EntityIndependentValueRangeDescriptor
As specified byValueRangeDescriptor.extractValueRange(Solution_, java.lang.Object)
.- Specified by:
extractValueRange
in interfaceEntityIndependentValueRangeDescriptor<Solution_>
- Parameters:
solution
- never null- Returns:
- never null
- See Also:
-