Class NetworkBuffer.Elements

  • Enclosing class:
    NetworkBuffer

    public static class NetworkBuffer.Elements
    extends java.lang.Object
    This class contains elements in a network buffer.
    • Constructor Detail

      • Elements

        public Elements()
    • Method Detail

      • addNode

        public void addNode​(LogicalNode node)
        Adds a node to the network elements.
        Parameters:
        node -
      • getLinkIntervals

        public NetworkBuffer.LinkIntervals[] getLinkIntervals()
        Returns the link intervals in the network elements.
        Returns:
      • getLinkIntervals

        public NetworkBuffer.LinkIntervals getLinkIntervals​(long linkId)
        Returns the link intervals of the specified link.
        Parameters:
        linkId - ID of the link
        Returns:
      • getNodes

        public LogicalNode[] getNodes()
        Returns the nodes in the network elements.
        Returns:
      • getNode

        public LogicalNode getNode​(long nodeId)
        Returns the node object of the specified node.
        Parameters:
        nodeId - ID of the node
        Returns:
      • getNumberOfNodes

        public int getNumberOfNodes()
        Returns the number of nodes in the network elements.
        Returns:
      • getNumberOfLinks

        public int getNumberOfLinks()
        Returns the number of links in the network elements.
        Returns:
      • hasLink

        public boolean hasLink​(long linkId)
        Checks whether the network elements contains the specified link.
        Parameters:
        linkId - ID of the link
        Returns:
      • hasNode

        public boolean hasNode​(long nodeId)
        Checks whether the network elements contains the specified node.
        Parameters:
        nodeId - ID of the node
        Returns:
      • removeLink

        public void removeLink​(long linkId)
        Removes the specified link from the network elements.
        Parameters:
        linkId - ID of the link
      • removeNode

        public void removeNode​(long nodeId)
        Removes the specified node from the network elements.
        Parameters:
        nodeId - ID of the node