public class FixedPriorityStrategy extends java.lang.Object implements IStrategy
DepthFirstStrategy but:
| Constructor and Description |
|---|
FixedPriorityStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
explore()
This method explores the design space as the implementation specifies.
|
java.util.Map<BatchTransformationRule<?,?>,java.lang.Integer> |
getPriorities() |
void |
initStrategy(ThreadContext context)
Initializes the strategy with a specific
ThreadContext. |
void |
interruptStrategy()
The implementation of this interface should be ready to be interrupted.
|
FixedPriorityStrategy |
withDepthLimit(int maxDepth)
Adds a depth limit to the strategy.
|
FixedPriorityStrategy |
withRulePriority(BatchTransformationRule<?,?> rule,
int priority)
Assigns a priority to a rule.
|
public FixedPriorityStrategy withDepthLimit(int maxDepth)
depthLimit - The depth limit.public FixedPriorityStrategy withRulePriority(BatchTransformationRule<?,?> rule, int priority)
rule - The transformation rule.priority - The priority of the rule. Higher is better.public java.util.Map<BatchTransformationRule<?,?>,java.lang.Integer> getPriorities()
public void initStrategy(ThreadContext context)
IStrategyThreadContext.initStrategy in interface IStrategycontext - The context.public void explore()
IStrategypublic void interruptStrategy()
IStrategyIStrategy.explore() method should return ASAP.
This method is also called by the SolutionStore class if enough solutions are found.interruptStrategy in interface IStrategy