Class NFEBasicNode

    • Constructor Detail

      • NFEBasicNode

        public NFEBasicNode()
    • Method Detail

      • setHierarchyLevel

        public void setHierarchyLevel​(int hierarchyLevel)
        Description copied from class: NFENode
        Sets the node's hierarchy level
        Specified by:
        setHierarchyLevel in class NFENode
        Parameters:
        hierarchyLevel - the node's hierarchy level
      • getHierarchyLevel

        public int getHierarchyLevel()
        Description copied from class: NFENode
        Gets the node's hierarchy level
        Specified by:
        getHierarchyLevel in class NFENode
        Returns:
        the nodes hierarchy level
      • setParentNodeId

        public void setParentNodeId​(long parentNodeId)
        Description copied from class: NFENode
        Sets the node's parent node id
        Specified by:
        setParentNodeId in class NFENode
        Parameters:
        parentNodeId - the node's parent node id
      • getParentNodeId

        public long getParentNodeId()
        Description copied from class: NFENode
        Gets the node's parent node id if any
        Specified by:
        getParentNodeId in class NFENode
        Returns:
        the node's parent node id or -1 if it does not have a parent node
      • getLinks

        public java.util.Collection<NFELink> getLinks()
        Description copied from class: NFENode
        Gets all the links (in and out) connected to the node
        Specified by:
        getLinks in class NFENode
        Returns:
        a collection containing all the links connected to the node as instances of NFELink
      • getInLinks

        public java.util.Collection<NFELink> getInLinks()
        Description copied from class: NFENode
        Gets all the in-links connected to the node
        Specified by:
        getInLinks in class NFENode
        Returns:
        a collection containing all the in-links connected to the node as instances of NFELink
      • getOutLinks

        public java.util.Collection<NFELink> getOutLinks()
        Description copied from class: NFENode
        Gets all the out-links connected to the node
        Specified by:
        getOutLinks in class NFENode
        Returns:
        a collection containing all the out-links connected to the node as instances of NFELink
      • getNumberOfLinks

        public int getNumberOfLinks()
        Description copied from class: NFENode
        Gets the number of links (in and out) connected to the node
        Specified by:
        getNumberOfLinks in class NFENode
        Returns:
        the total number of connected links
      • getNumberOfInLinks

        public int getNumberOfInLinks()
        Description copied from class: NFENode
        Gets the number of in-links connected to the node
        Specified by:
        getNumberOfInLinks in class NFENode
        Returns:
        the total number of connected in-links
      • getNumberOfOutLinks

        public int getNumberOfOutLinks()
        Description copied from class: NFENode
        Gets the number of out-links connected to the node
        Specified by:
        getNumberOfOutLinks in class NFENode
        Returns:
        the total number of connected out-links
      • getPartitionId

        public long getPartitionId()
        Description copied from class: NFENode
        Gets the node's partition id
        Specified by:
        getPartitionId in class NFENode
        Returns:
        the node's partition id
      • setPartitionId

        public void setPartitionId​(long partitionId)
        Description copied from class: NFENode
        Sets the node's partition id
        Specified by:
        setPartitionId in class NFENode
        Parameters:
        partitionId - the node's partition id
      • addLink

        protected boolean addLink​(NFELink link,
                                  boolean addInLink)
        Description copied from class: NFENode
        Connects a link to the node. Whether the link is in or out is specified by the addStartLink parameter
        Specified by:
        addLink in class NFENode
        Parameters:
        link - an NFELink instance to be connected
        addInLink - if true, the link is connected as in-link, otherwise, it is connected as out-link
        Returns:
      • removeLink

        protected boolean removeLink​(NFELink link,
                                     boolean removeInLink)
        Description copied from class: NFENode
        Removes the link from the node
        Specified by:
        removeLink in class NFENode
        Parameters:
        link - an NFELink instance to be disconnected
        removeInLink - if true, the link is disconnected as in-link, otherwise it is disconnected as out-link.
        Returns:
        true if the link was removed. It returns false if the link was not previously connected to the node or if the link was not connected as specified by the removeInLink boolean parameter.