Interface ValueRangeDescriptor<Solution_>
- Type Parameters:
Solution_- the solution type, the class with thePlanningSolutionannotation
- All Known Subinterfaces:
EntityIndependentValueRangeDescriptor<Solution_>
- All Known Implementing Classes:
AbstractFromPropertyValueRangeDescriptor,AbstractValueRangeDescriptor,CompositeValueRangeDescriptor,FromEntityPropertyValueRangeDescriptor,FromSolutionPropertyValueRangeDescriptor
public interface ValueRangeDescriptor<Solution_>
-
Method Summary
Modifier and TypeMethodDescription<Value_> ValueRange<Value_>extractValueRange(Solution_ solution, Object entity) longextractValueRangeSize(Solution_ solution, Object entity) booleanbooleanIf this method return true, this instance is safe to cast toEntityIndependentValueRangeDescriptor, otherwise it requires an entity to determine theValueRange.boolean
-
Method Details
-
getVariableDescriptor
GenuineVariableDescriptor<Solution_> getVariableDescriptor()- Returns:
- never null
-
isCountable
boolean isCountable()- Returns:
- true if the
ValueRangeis countable (for example a double value range between 1.2 and 1.4 is not countable)
-
isEntityIndependent
boolean isEntityIndependent()If 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
-
mightContainEntity
boolean mightContainEntity()- Returns:
- true if the
ValueRangemight contain a planning entity instance (not necessarily of the same entity class as this entity class of this descriptor.
-
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
- Throws:
UnsupportedOperationException- ifisCountable()returns false
-