Interface Related

    • Method Detail

      • addRelation

        void addRelation​(UnitRelation rel)
        Add a new relation to this object.
        Parameters:
        rel -
      • removeRelation

        UnitRelation removeRelation​(UnitRelation rel)
        Removes the given relation.
        Parameters:
        rel -
        Returns:
        old relation
      • clearRelations

        void clearRelations()
        Removes all relations.
      • getRelations

        java.util.List<UnitRelation> getRelations()
        Delivers all relations.
        Returns:
        list of all relations
      • getRelations

        <T extends UnitRelation> java.util.List<T> getRelations​(java.lang.Class<T> relationClass)
        Delivers all relations of the given class (and its subtypes!).
        Parameters:
        relationClass - Should be a subclass of UnitRelation
        Returns:
        list of relations that are instances of relationClass