Class PathConnector

  • All Implemented Interfaces:
    BaseElement, MDElement, ModelElementProvider, NameOwner, java.beans.PropertyChangeListener, java.lang.Cloneable, java.lang.Comparable, java.util.EventListener
    Direct Known Subclasses:
    PathElement, ShapeElement

    @OpenApi
    public abstract class PathConnector
    extends PresentationElement
    This class is base class for presentation elements connectible by some path element. This means that instance of this class can have incoming or outgoing path elements.
    • Method Detail

      • getConnectedPathElements

        @OpenApi
        public final java.util.List<PathElement> getConnectedPathElements()
        Returns connected path elements. If element has no path elements returns empty list.
        Returns:
        connected path elements. Collection is unmodifiable.
      • getConnectedPathElements

        @OpenApi
        public java.util.List<PathElement> getConnectedPathElements​(boolean incoming)
        Returns connected path elements by direction.
        Parameters:
        incoming - true if incoming paths should be selected, false if outgoing.
        Returns:
        connected path elements.
      • getConnectedPathElements

        @OpenApi
        public java.util.List<PathElement> getConnectedPathElements​(boolean incoming,
                                                                    boolean excludeToSelf)
        Returns connected path elements by direction with an option to exclude paths to self
        Parameters:
        incoming - true if incoming paths should be selected, false if outgoing.
        excludeToSelf - true if paths with source equal to target should not be added to the list, false to include them
        Returns:
        connected path elements.
      • getConnectedPathElementCount

        @OpenApi
        public final int getConnectedPathElementCount()
        Returns number of connected path elements.
        Returns:
        number of connected path elements.
      • accept

        @OpenApi
        public void accept​(Visitor visitor)
                    throws java.lang.Exception
        Description copied from interface: MDElement
        Method accepts visitor, and calls method visit<class name>(this) of visitor . See Visitor pattern for more details.
        Specified by:
        accept in interface MDElement
        Overrides:
        accept in class com.nomagic.magicdraw.uml.MDElementImpl
        Parameters:
        visitor - which visits this element.
        Throws:
        java.lang.Exception