Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.CR1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.optaplanner.core.impl.domain.valuerange.descriptor
Class CompositeValueRangeDescriptor

    java.lang.Object
      org.optaplanner.core.impl.domain.valuerange.descriptor.AbstractValueRangeDescriptor
          org.optaplanner.core.impl.domain.valuerange.descriptor.CompositeValueRangeDescriptor

All Implemented Interfaces:
  EntityIndependentValueRangeDescriptor, ValueRangeDescriptor

    public class CompositeValueRangeDescriptor

extends AbstractValueRangeDescriptor
implements EntityIndependentValueRangeDescriptor

Field Summary
`protected List<ValueRangeDescriptor>` | `childValueRangeDescriptorList`
`protected boolean` | `entityIndependent`

Fields inherited from class org.optaplanner.core.impl.domain.valuerange.descriptor.AbstractValueRangeDescriptor
`addNullInValueRange, variableDescriptor`

Constructor Summary
`CompositeValueRangeDescriptor(GenuineVariableDescriptor variableDescriptor, boolean addNullInValueRange, List<ValueRangeDescriptor> childValueRangeDescriptorList)`

Method Summary
`ValueRange<?>` | `extractValueRange(Solution solution)` As specified by `ValueRangeDescriptor.extractValueRange(Solution, Object)`.
`ValueRange<?>` | `extractValueRange(Solution solution, Object entity)`
`boolean` | `isCountable()`
`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.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, mightContainEntity`

Field Detail

### childValueRangeDescriptorList

    protected final List<ValueRangeDescriptor> childValueRangeDescriptorList

### entityIndependent

    protected boolean entityIndependent

Constructor Detail

### CompositeValueRangeDescriptor

    public CompositeValueRangeDescriptor(GenuineVariableDescriptor variableDescriptor,
                                         boolean addNullInValueRange,
                                         List<ValueRangeDescriptor> childValueRangeDescriptorList)

Method Detail

### isCountable

    public boolean isCountable()

  Specified by:
    `isCountable` in interface `ValueRangeDescriptor`
  Returns:
    true if the `ValueRange` is countable (for example a double value range between 1.2 and 1.4 is not countable)

### 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)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.CR1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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