Class TransferToShipTradeStep

  • All Implemented Interfaces:
    ITradeStep

    public class TransferToShipTradeStep
    extends java.lang.Object
    implements ITradeStep
    Trade step to transfer selected wares and quantities to the ship.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2017 Created on Oct 23, 2017
    • Field Detail

      • city

        private ICity city
      • transferableWares

        private java.util.Map<IWare,​java.lang.Integer> transferableWares
      • tradeService

        @Autowired
        private TradeService tradeService
    • Constructor Detail

      • TransferToShipTradeStep

        public TransferToShipTradeStep()
    • 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