public class ContextTargetProfitStrategy extends java.lang.Object implements ContextStrategy
Modifier and Type | Field and Description |
---|---|
StrategyTargetProfitPolicy |
strategy |
Constructor and Description |
---|
ContextTargetProfitStrategy(java.lang.String strategyName) |
Modifier and Type | Method and Description |
---|---|
void |
execute(MyFoodora myFoodora,
double targetProfit) |
StrategyTargetProfitPolicy |
getStrategy() |
void |
setStrategy(StrategyTargetProfitPolicy strategy) |
void |
setStrategy(java.lang.String strategyName) |
java.lang.String |
toString() |
public StrategyTargetProfitPolicy strategy
public ContextTargetProfitStrategy(java.lang.String strategyName) throws ExceptionUnknownStartegyType
ExceptionUnknownStartegyType
public void setStrategy(java.lang.String strategyName) throws ExceptionUnknownStartegyType
setStrategy
in interface ContextStrategy
ExceptionUnknownStartegyType
public void execute(MyFoodora myFoodora, double targetProfit)
public java.lang.String toString()
toString
in class java.lang.Object
public StrategyTargetProfitPolicy getStrategy()
public void setStrategy(StrategyTargetProfitPolicy strategy)