Class NodeImpl

    • Field Detail

      • nodeId

        protected long nodeId
        Unique node identifier
      • name

        protected String name
        name of the node
    • Constructor Detail

      • NodeImpl

        protected NodeImpl​(IdGroupingToken groupId)
        Node constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
      • NodeImpl

        protected NodeImpl​(NodeImpl nodeImpl)
        Copy constructor, see also VertexImpl
        Parameters:
        nodeImpl - to copy
    • Method Detail

      • generateNodeId

        protected static long generateNodeId​(IdGroupingToken groupId)
        generate unique node id
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        Returns:
        nodeId
      • setNodeId

        protected void setNodeId​(long nodeId)
        set the node id on this node
        Parameters:
        nodeId - to set
      • getNodeId

        public long getNodeId()
        Collect the id of the node. Not all vertices need to be nodes, this node id is contiguous and unique to the nodes in the network, but not necessarily across all vertices in the network
        Specified by:
        getNodeId in interface Node
        Returns:
        node id
      • getName

        public String getName()
        get the name of this node (if any)
        Specified by:
        getName in interface Node
        Returns:
        name of the node
      • setName

        public void setName​(String name)
        set the name of the node
        Specified by:
        setName in interface Node
        Parameters:
        name - of the node