Class ReserveRelation


  • public class ReserveRelation
    extends UnitRelation
    This relation holds information about a unit reserving some item.
    Author:
    stm
    • Field Detail

      • itemType

        public ItemType itemType
        The type of item being reserved
      • amount

        public int amount
        The amount that is actually reserved. Usually min(item.amount, simpleAmount * (each?unit.getPersons():1))
    • Constructor Detail

      • ReserveRelation

        public ReserveRelation​(Unit source,
                               int amount,
                               ItemType itemType,
                               int line)
        Constructs a ReserveRelation (with warning parameter).
        Parameters:
        source - The reserving unit
        amount - The amount. Order.ALL for "ALLES"
        itemType - The item (type)
        line - The line number in the unit's orders
      • ReserveRelation

        public ReserveRelation​(Unit origin,
                               Unit source,
                               int amount,
                               ItemType type,
                               int line)
        Constructs a ReserveRelation (with warning parameter).
        Parameters:
        origin - The reserving unit
        source - The reserving unit
        amount - The amount. Order.ALL for "ALLES"
        type - The item (type)
        line - The line number in the unit's orders