Class NodeImpl

    • Field Detail

      • nodeId

        protected final long nodeId
        Unique node identifier
      • externalId

        protected Object externalId
        External identifier used in input files
    • Constructor Detail

      • NodeImpl

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

      • generateNodeId

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

        public Object getExternalId()
        Collect the external id of the node
        Specified by:
        getExternalId in interface Node
        Returns:
        external id
      • setExternalId

        public void setExternalId​(Object externalId)
        Set the external id of the node
        Specified by:
        setExternalId in interface Node
        Parameters:
        externalId - the external id to set
      • hasExternalId

        public boolean hasExternalId()
        Returns whether the node has an external Id set
        Specified by:
        hasExternalId in interface Node
        Returns:
        true if the node has an external Id, false otherwise
      • 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 necesssarily across all vertices in the network
        Specified by:
        getNodeId in interface Node
        Returns:
        node id