public void inherit(ChangeMoveSelectorConfig inheritedConfig) { super.inherit(inheritedConfig); if (entitySelectorConfig == null) { entitySelectorConfig = inheritedConfig.getEntitySelectorConfig(); } else if (inheritedConfig.getEntitySelectorConfig() != null) { entitySelectorConfig.inherit(inheritedConfig.getEntitySelectorConfig()); } if (valueSelectorConfig == null) { valueSelectorConfig = inheritedConfig.getValueSelectorConfig(); } else if (inheritedConfig.getValueSelectorConfig() != null) { valueSelectorConfig.inherit(inheritedConfig.getValueSelectorConfig()); } }
public MoveSelector buildBaseMoveSelector( EnvironmentMode environmentMode, SolutionDescriptor solutionDescriptor, SelectionOrder resolvedSelectionOrder, SelectionCacheType minimumCacheType) { EntitySelector entitySelector = entitySelectorConfig.buildEntitySelector( environmentMode, solutionDescriptor, resolvedSelectionOrder, minimumCacheType); ValueSelector valueSelector = valueSelectorConfig.buildValueSelector( environmentMode, solutionDescriptor, resolvedSelectionOrder, minimumCacheType, entitySelector.getEntityDescriptor()); return new ChangeMoveSelector( entitySelector, valueSelector, resolvedSelectionOrder == SelectionOrder.RANDOM); }