Class VertexImpl

    • Field Detail

      • inputProperties

        protected Map<String,​Object> inputProperties
        generic input property storage
      • position

        protected org.locationtech.jts.geom.Point position
        Position of the vertex
      • edges

        protected final Map<Long,​Edge> edges
        Edges of this vertex
    • Constructor Detail

      • VertexImpl

        protected VertexImpl​(IdGroupingToken groupId)
        Constructor
        Parameters:
        groupId - , contiguous id generation within this group for instances of this class
      • VertexImpl

        protected VertexImpl​(VertexImpl vertexImpl)
        Copy constructor. Geometry and input properties are deep copied, edges are not because they are not owned by this class by the vertex.
        Parameters:
        vertexImpl - to copy
    • Method Detail

      • getPosition

        public org.locationtech.jts.geom.Point getPosition()
        #Collect the geometry of the point location of this vertex
        Specified by:
        getPosition in interface Vertex
        Returns:
        direct position reflecting point location
      • setPosition

        public void setPosition​(org.locationtech.jts.geom.Point position)
        #Set the center point geometry for a vertex
        Specified by:
        setPosition in interface Vertex
        Parameters:
        position - the center point for a vertex
      • addInputProperty

        public void addInputProperty​(String key,
                                     Object value)
        Add a property from the original input that is not part of the readily available members
        Specified by:
        addInputProperty in interface Vertex
        Parameters:
        key - key (name) of the input property
        value - value of the input property
      • getInputProperty

        public Object getInputProperty​(String key)
        collect a property
        Specified by:
        getInputProperty in interface Vertex
        Parameters:
        key - for the property
        Returns:
        property itself
      • addEdge

        public boolean addEdge​(Edge edge)
        Add edge, do not invoke when parsing networks, this connection is auto-populated before the assignment starts based on the edge and its two vertices that have been registered.
        Specified by:
        addEdge in interface Vertex
        Parameters:
        edge - Edge to be added
        Returns:
        true when added, false when already present (and not added)
      • removeEdge

        public boolean removeEdge​(long edgeId)
        Remove edge
        Specified by:
        removeEdge in interface Vertex
        Parameters:
        edgeId - Edge to be removed
        Returns:
        true when removed, false when not present (and not removed)
      • getEdges

        public Collection<Edge> getEdges()
        Returns a collection of Edge objects (unmodifiable)
        Specified by:
        getEdges in interface Vertex
        Returns:
        Set of Edge objects