Class UnitContainerRelation

    • Field Detail

      • target

        public final UnitContainer target
        The container affected by this relation.
    • Constructor Detail

      • UnitContainerRelation

        public UnitContainerRelation​(Unit s,
                                     UnitContainer t,
                                     int line)
        Creates a new UnitContainerRelation object.
        Parameters:
        s - The source unit
        t - The target container
        line - The line in the source's orders
    • Method Detail

      • add

        public void add()
        Attaches an order to all report objects it is relevant to.
        Overrides:
        add in class UnitRelation
      • isRelated

        public boolean isRelated​(java.lang.Object object)
        Description copied from class: UnitRelation
        Returns true if this relation somehow relates to the specified object. Subclasses should overwrite this method if they involve relations to other report objects.
        Overrides:
        isRelated in class UnitRelation
        Returns:
        true if the object is source or origin or otherwise affected by this relation