Class ItemTransferRelation


  • public class ItemTransferRelation
    extends TransferRelation
    A relation indicating that a unit transfers a certain amount of an item to another unit.
    • Field Detail

      • itemType

        public ItemType itemType
        The transferred item.
    • Constructor Detail

      • ItemTransferRelation

        public ItemTransferRelation​(Unit source,
                                    Unit target,
                                    int amount,
                                    ItemType type,
                                    int line)
        Parameters:
        source -
        target -
        amount -
        type -
        line -
      • ItemTransferRelation

        public ItemTransferRelation​(Unit source,
                                    Unit target,
                                    int amount,
                                    ItemType type,
                                    int line,
                                    boolean warning)
        Creates a new ItemTransferRelation object.
        Parameters:
        source - The source unit
        target - The target unit
        amount - The amount to transfer
        type - The item to transfer
        line - The line in the source's orders
        warning -
      • ItemTransferRelation

        public ItemTransferRelation​(Unit origin,
                                    Unit source,
                                    Unit target,
                                    int amount,
                                    ItemType type,
                                    int line)
        Creates a new ItemTransferRelation object.
        Parameters:
        origin - The origin unit
        source - The source unit
        target - The target unit
        amount - The amount to transfer
        type - The item to transfer
        line - The line in the source's orders