Class AggregatesSellTradeStep
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.player.tradesteps.AggregatesSellTradeStep
-
- All Implemented Interfaces:
ITradeStep
public class AggregatesSellTradeStep extends java.lang.Object implements ITradeStep
Trade step aggregating several wares to sell.
-
-
Field Summary
Fields Modifier and Type Field Description private ICity
city
private org.springframework.context.ApplicationContext
context
private boolean
executeNext
private java.util.ArrayList<SellTradeStep>
tradeSteps
private INavigableVessel
vessel
-
Constructor Summary
Constructors Constructor Description AggregatesSellTradeStep()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSellStep(IWare ware)
boolean
execute()
Execute the trade step.java.lang.String
toString()
-
-
-
Field Detail
-
vessel
private INavigableVessel vessel
-
city
private ICity city
-
executeNext
private boolean executeNext
-
context
@Autowired private org.springframework.context.ApplicationContext context
-
tradeSteps
private java.util.ArrayList<SellTradeStep> tradeSteps
-
-
Method Detail
-
addSellStep
public void addSellStep(IWare ware)
-
execute
public boolean execute()
Description copied from interface:ITradeStep
Execute the trade step.- Specified by:
execute
in interfaceITradeStep
- Returns:
- true if the next step can be executed on completion or if the execution is triggered by the arrival of the ship in the next port.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-