OptaPlanner core 6.2.0.CR2

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

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.FromEntityPropertyValueRangeDescriptor
All Implemented Interfaces:
ValueRangeDescriptor

public class FromEntityPropertyValueRangeDescriptor
extends AbstractFromPropertyValueRangeDescriptor


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
FromEntityPropertyValueRangeDescriptor(GenuineVariableDescriptor variableDescriptor, boolean addNullInValueRange, Method readMethod)
           
 
Method Summary
 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
 

Constructor Detail

FromEntityPropertyValueRangeDescriptor

public FromEntityPropertyValueRangeDescriptor(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.

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 null
entity - never null. To avoid this parameter, use EntityIndependentValueRangeDescriptor.extractValueRange(Solution) instead.
Returns:
never null

OptaPlanner core 6.2.0.CR2

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