Class NFELink

    • Field Detail

      • PROP_LEVEL

        public static final java.lang.String PROP_LEVEL
        Link level property
        See Also:
        Constant Field Values
      • PROP_BIDIRECTED

        public static final java.lang.String PROP_BIDIRECTED
        Link bidirected property
        See Also:
        Constant Field Values
      • PROP_PARENT_LINK_ID

        public static final java.lang.String PROP_PARENT_LINK_ID
        Parent link id property
        See Also:
        Constant Field Values
      • PROP_START_NODE

        public static final java.lang.String PROP_START_NODE
        Link's start node property
        See Also:
        Constant Field Values
      • PROP_END_NODE

        public static final java.lang.String PROP_END_NODE
        Link's end node property
        See Also:
        Constant Field Values
    • Constructor Detail

    • Method Detail

      • setLevel

        public abstract void setLevel​(int level)
        Sets the link's level
        Parameters:
        level - the link's level
      • getLevel

        public abstract int getLevel()
        Gets the link's level
        Returns:
        the link's level
      • setBidirected

        public abstract void setBidirected​(boolean bidirected)
        Sets whether the link is bidirected or not
        Parameters:
        bidirected - true for bidirected, false for single direction
      • isBidirected

        public abstract boolean isBidirected()
        Tells whether the link is bidirected or not
        Returns:
        true for bidirected, false for single direction
      • setParentLinkId

        public abstract void setParentLinkId​(long parentLinkId)
        Sets the link's parent link ID
        Parameters:
        parentLinkId - the link's parent link ID
      • getParentLinkId

        public abstract long getParentLinkId()
        Gets the link's parent link ID (if any)
        Returns:
        the link's parent link ID or -1 if the link does not have a parent link
      • getStartNode

        public NFENode getStartNode()
        Gets the link's start node
        Returns:
        an NFENode instance
      • getEndNode

        public NFENode getEndNode()
        Gets the link's end node
        Returns:
        an NFENode instance
      • setNode

        protected void setNode​(NFENode node,
                               boolean setStartNode)
        Sets a node as start or end node, depending on the value of the setStatNode parameter
        Parameters:
        node - an NFENode instance
        setStartNode - when it is true, the node is set as start node, otherwise, the node is set as end node
      • isNode

        public boolean isNode()
        Description copied from class: NFENetworkElement
        Tells whether the network element is a node or not
        Specified by:
        isNode in class NFENetworkElement
        Returns:
        true if the network element is a node
      • isLink

        public boolean isLink()
        Description copied from class: NFENetworkElement
        Tells whether the network element is a link or not
        Specified by:
        isLink in class NFENetworkElement
        Returns:
        true if the network element is a link
      • getKey

        public java.lang.String getKey()
        Description copied from class: NFENetworkElement
        Gets the network element's key. The key is a unique value to differentiate a network element among other network elements in the same network. There could be a node and a link with the same ID but cannot exist two network elements (node or links) with the same key
        Specified by:
        getKey in class NFENetworkElement
        Returns:
        the network element's key