Class InterUnitRelation

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add()
      Attaches an order to all report objects it is relevant to. source and target.
      boolean isRelated​(java.lang.Object object)
      Returns true if this relation somehow relates to the specified object.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • target

        public Unit target
        The unit that is the target of the relation
    • Constructor Detail

      • InterUnitRelation

        public InterUnitRelation​(Unit source,
                                 Unit target,
                                 int line)
        Creates a new InterUnitRelation object.
        Parameters:
        source - The source unit
        target - The target unit
        line - The line in the source's orders
      • InterUnitRelation

        public InterUnitRelation​(Unit origin,
                                 Unit source,
                                 Unit target,
                                 int line)
        Creates a new InterUnitRelation object.
        Parameters:
        origin - The origin unit
        source - The source unit
        target - The target unit
        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. source and target.
        Overrides:
        add in class UnitRelation
        See Also:
        UnitRelation.add()
      • 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, origin or target
        See Also:
        UnitRelation.isRelated(java.lang.Object)