OptaPlanner core 6.1.0.CR2

org.optaplanner.core.impl.domain.valuerange.descriptor
Class FromSolutionPropertyValueRangeDescriptor

java.lang.Object
  extended by org.optaplanner.core.impl.domain.valuerange.descriptor.AbstractValueRangeDescriptor
      extended by org.optaplanner.core.impl.domain.valuerange.descriptor.AbstractFromPropertyValueRangeDescriptor
          extended by org.optaplanner.core.impl.domain.valuerange.descriptor.FromSolutionPropertyValueRangeDescriptor
All Implemented Interfaces:
EntityIndependentValueRangeDescriptor, ValueRangeDescriptor

public class FromSolutionPropertyValueRangeDescriptor
extends AbstractFromPropertyValueRangeDescriptor
implements EntityIndependentValueRangeDescriptor


Field Summary
 
Fields inherited from class org.optaplanner.core.impl.domain.valuerange.descriptor.AbstractFromPropertyValueRangeDescriptor
collectionWrapping, countable, readMethodAccessor
 
Fields inherited from class org.optaplanner.core.impl.domain.valuerange.descriptor.AbstractValueRangeDescriptor
addNullInValueRange, variableDescriptor
 
Constructor Summary
FromSolutionPropertyValueRangeDescriptor(GenuineVariableDescriptor variableDescriptor, boolean addNullInValueRange, Method readMethod)
           
 
Method Summary
 ValueRange<?> extractValueRange(Solution solution)
          As specified by ValueRangeDescriptor.extractValueRange(Solution, Object).
 ValueRange<?> extractValueRange(Solution solution, Object entity)
           
 boolean isEntityIndependent()
          If this method return true, this instance is safe to cast to EntityIndependentValueRangeDescriptor, otherwise it requires an entity to determine the ValueRange.
 
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 Detail

FromSolutionPropertyValueRangeDescriptor

public FromSolutionPropertyValueRangeDescriptor(GenuineVariableDescriptor variableDescriptor,
                                                boolean addNullInValueRange,
                                                Method readMethod)
Method Detail

isEntityIndependent

public boolean isEntityIndependent()
Description copied from interface: ValueRangeDescriptor
If this method return true, this instance is safe to cast to EntityIndependentValueRangeDescriptor, otherwise it requires an entity to determine the ValueRange.

Specified by:
isEntityIndependent in interface ValueRangeDescriptor
Returns:
true if the ValueRange is the same for all entities of the same solution

extractValueRange

public ValueRange<?> extractValueRange(Solution solution,
                                       Object entity)
Specified by:
extractValueRange in interface ValueRangeDescriptor
Parameters:
solution - never null
entity - never null. To avoid this parameter, use EntityIndependentValueRangeDescriptor.extractValueRange(Solution) instead.
Returns:
never null

extractValueRange

public ValueRange<?> extractValueRange(Solution solution)
Description copied from interface: EntityIndependentValueRangeDescriptor
As specified by ValueRangeDescriptor.extractValueRange(Solution, Object).

Specified by:
extractValueRange in interface EntityIndependentValueRangeDescriptor
Parameters:
solution - never null
Returns:
never null
See Also:
ValueRangeDescriptor.extractValueRange(Solution, Object)

OptaPlanner core 6.1.0.CR2

Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.