Class CheckedSellTradeStep

  • All Implemented Interfaces:
    ITradeStep

    public class CheckedSellTradeStep
    extends java.lang.Object
    implements ITradeStep
    Implements the sell step for selling a single ware up to a minimum sell price and a maximum amount.
    • Field Detail

      • city

        private ICity city
      • ware

        private IWare ware
      • maxAmount

        private int maxAmount
      • tradeService

        @Autowired
        private TradeService tradeService
      • executeNext

        private boolean executeNext
    • Constructor Detail

      • CheckedSellTradeStep

        public CheckedSellTradeStep()
    • Method Detail

      • execute

        public boolean execute()
        Description copied from interface: ITradeStep
        Execute the trade step.
        Specified by:
        execute in interface ITradeStep
        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 class java.lang.Object