Class AmountBasedAggregatedDumpTradeStep

  • All Implemented Interfaces:
    ITradeStep

    public class AmountBasedAggregatedDumpTradeStep
    extends AbstractAggregateDumpTradeStep
    This dump sell step is conditional based on the amount of loaded wares on the ship. It is best used with a preceding sell step and then use this dump step to check if there is too much wares loaded and to dump them.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2016 Created on Jul 24, 2016
    • Field Detail

      • maxAmount

        private int maxAmount
        Maximal amount that should be on the ship. If there is more loaded everything is dumped.
    • Constructor Detail

      • AmountBasedAggregatedDumpTradeStep

        public AmountBasedAggregatedDumpTradeStep()
    • Method Detail

      • execute

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